mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 15:58:37 +00:00
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 inf9f5677b3e/pkg/registry/core/replicationcontroller/storage/storage_test.go (L178)
should return fromf9f5677b3e/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 ```
This commit is contained in:
commit
7c7370ea2d
@ -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{})
|
||||
|
Loading…
Reference in New Issue
Block a user