fix increment-decrement lint error

This commit is contained in:
danielqsj
2019-05-06 13:14:51 +08:00
parent c516bb51e3
commit 142fe19f2d
7 changed files with 15 additions and 15 deletions

View File

@@ -176,7 +176,7 @@ func TestGenerationNumber(t *testing.T) {
}
// Updates to spec should increment the generation number
controller.Spec.Replicas += 1
controller.Spec.Replicas++
if _, _, err := storage.Controller.Update(ctx, controller.Name, rest.DefaultUpdatedObjectInfo(controller), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}); err != nil {
t.Errorf("unexpected error: %v", err)
}
@@ -190,7 +190,7 @@ func TestGenerationNumber(t *testing.T) {
}
// Updates to status should not increment either spec or status generation numbers
controller.Status.Replicas += 1
controller.Status.Replicas++
if _, _, err := storage.Controller.Update(ctx, controller.Name, rest.DefaultUpdatedObjectInfo(controller), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}); err != nil {
t.Errorf("unexpected error: %v", err)
}