Skip to content

Commit 0f336e0

Browse files
authored
Merge pull request kubernetes#89236 from liggitt/fix-gc-test
Restore orphaning check in gc test
2 parents c50054b + 69eb837 commit 0f336e0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/integration/garbagecollector/garbage_collector_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,9 @@ func setupRCsPods(t *testing.T, gc *garbagecollector.GarbageCollector, clientSet
461461
}
462462
orphan := false
463463
switch {
464+
case options.OrphanDependents == nil && options.PropagationPolicy == nil && len(initialFinalizers) == 0:
465+
// if there are no deletion options, the default policy for replication controllers is orphan
466+
orphan = true
464467
case options.OrphanDependents != nil:
465468
// if the deletion options explicitly specify whether to orphan, that controls
466469
orphan = *options.OrphanDependents

0 commit comments

Comments
 (0)