Merge pull request #118463 from testwill/replace_loop

chore: slice replace loop
This commit is contained in:
Kubernetes Prow Robot
2023-10-24 15:04:39 +02:00
committed by GitHub
4 changed files with 5 additions and 15 deletions

View File

@@ -640,9 +640,7 @@ func (tc *testContext) verify(t *testing.T, expected result, initialObjects []me
assert.Equal(t, expected.status, status)
objects := tc.listAll(t)
wantObjects := update(t, initialObjects, expected.changes)
for _, add := range expected.added {
wantObjects = append(wantObjects, add)
}
wantObjects = append(wantObjects, expected.added...)
for _, remove := range expected.removed {
for i, obj := range wantObjects {
// This is a bit relaxed (no GVR comparison, no UID