Unverified Commit 7c7370ea authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #60687 from lcfang/test0302

Automatic merge from submit-queue (batch tested with PRs 59637, 60611, 60788, 60489, 60687). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. fix the bad err **What this PR does / why we need it**: the err in https://github.com/kubernetes/kubernetes/blob/f9f5677b3edecfc73af3e643db814e716b7f694f/pkg/registry/core/replicationcontroller/storage/storage_test.go#L178 should return from https://github.com/kubernetes/kubernetes/blob/f9f5677b3edecfc73af3e643db814e716b7f694f/pkg/registry/core/replicationcontroller/storage/storage_test.go#L177 **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
parents e2f6bd67 7f38898a
......@@ -174,8 +174,7 @@ func TestGenerationNumber(t *testing.T) {
// Updates to spec should increment the generation number
controller.Spec.Replicas += 1
storage.Controller.Update(ctx, controller.Name, rest.DefaultUpdatedObjectInfo(controller), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc)
if err != nil {
if _, _, err := storage.Controller.Update(ctx, controller.Name, rest.DefaultUpdatedObjectInfo(controller), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc); err != nil {
t.Errorf("unexpected error: %v", err)
}
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
controller.Status.Replicas += 1
storage.Controller.Update(ctx, controller.Name, rest.DefaultUpdatedObjectInfo(controller), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc)
if err != nil {
if _, _, err := storage.Controller.Update(ctx, controller.Name, rest.DefaultUpdatedObjectInfo(controller), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc); err != nil {
t.Errorf("unexpected error: %v", err)
}
ctrl, err = storage.Controller.Get(ctx, rc.Name, &metav1.GetOptions{})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment