Add more //nolint:staticcheck for failures caught in PR tests

This commit is contained in:
Hanna Lee
2021-07-18 14:48:32 -04:00
committed by Antonio Ojea
parent c862d7c0e9
commit c8fde197f5
3 changed files with 6 additions and 6 deletions

View File

@@ -599,12 +599,12 @@ func setupRCsPods(t *testing.T, gc *garbagecollector.GarbageCollector, clientSet
orphan := false
switch {
//lint:file-ignore SA1019 Keep testing deprecated OrphanDependents option until it's being removed
case options.OrphanDependents == nil && options.PropagationPolicy == nil && len(initialFinalizers) == 0:
case options.OrphanDependents == nil && options.PropagationPolicy == nil && len(initialFinalizers) == 0: //nolint:staticcheck
// if there are no deletion options, the default policy for replication controllers is orphan
orphan = true
case options.OrphanDependents != nil:
case options.OrphanDependents != nil: //nolint:staticcheck
// if the deletion options explicitly specify whether to orphan, that controls
orphan = *options.OrphanDependents
orphan = *options.OrphanDependents //nolint:staticcheck
case options.PropagationPolicy != nil:
// if the deletion options explicitly specify whether to orphan, that controls
orphan = *options.PropagationPolicy == metav1.DeletePropagationOrphan