mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
fix the bad err
This commit is contained in:
parent
f9f5677b3e
commit
7f38898abd
@ -174,8 +174,7 @@ func TestGenerationNumber(t *testing.T) {
|
|||||||
|
|
||||||
// Updates to spec should increment the generation number
|
// Updates to spec should increment the generation number
|
||||||
controller.Spec.Replicas += 1
|
controller.Spec.Replicas += 1
|
||||||
storage.Controller.Update(ctx, controller.Name, rest.DefaultUpdatedObjectInfo(controller), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc)
|
if _, _, err := storage.Controller.Update(ctx, controller.Name, rest.DefaultUpdatedObjectInfo(controller), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc); err != nil {
|
||||||
if err != nil {
|
|
||||||
t.Errorf("unexpected error: %v", err)
|
t.Errorf("unexpected error: %v", err)
|
||||||
}
|
}
|
||||||
ctrl, err = storage.Controller.Get(ctx, rc.Name, &metav1.GetOptions{})
|
ctrl, err = storage.Controller.Get(ctx, rc.Name, &metav1.GetOptions{})
|
||||||
@ -189,8 +188,7 @@ func TestGenerationNumber(t *testing.T) {
|
|||||||
|
|
||||||
// Updates to status should not increment either spec or status generation numbers
|
// Updates to status should not increment either spec or status generation numbers
|
||||||
controller.Status.Replicas += 1
|
controller.Status.Replicas += 1
|
||||||
storage.Controller.Update(ctx, controller.Name, rest.DefaultUpdatedObjectInfo(controller), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc)
|
if _, _, err := storage.Controller.Update(ctx, controller.Name, rest.DefaultUpdatedObjectInfo(controller), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc); err != nil {
|
||||||
if err != nil {
|
|
||||||
t.Errorf("unexpected error: %v", err)
|
t.Errorf("unexpected error: %v", err)
|
||||||
}
|
}
|
||||||
ctrl, err = storage.Controller.Get(ctx, rc.Name, &metav1.GetOptions{})
|
ctrl, err = storage.Controller.Get(ctx, rc.Name, &metav1.GetOptions{})
|
||||||
|
Loading…
Reference in New Issue
Block a user