Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated cherry pick of #89236: Restore orphaning check in gc test #89237

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions test/integration/garbagecollector/garbage_collector_test.go
Expand Up @@ -461,6 +461,9 @@ func setupRCsPods(t *testing.T, gc *garbagecollector.GarbageCollector, clientSet
}
orphan := false
switch {
case options.OrphanDependents == nil && options.PropagationPolicy == nil && len(initialFinalizers) == 0:
// if there are no deletion options, the default policy for replication controllers is orphan
orphan = true
case options.OrphanDependents != nil:
// if the deletion options explicitly specify whether to orphan, that controls
orphan = *options.OrphanDependents
Expand Down