Cleanup defer from SetFeatureGateDuringTest function call

This commit is contained in:
Marek Siarkowicz
2024-04-23 10:39:47 +02:00
committed by Marek Siarkowicz
parent bf6507070c
commit 3ee8178768
187 changed files with 547 additions and 565 deletions

View File

@@ -478,7 +478,7 @@ func forEachFeatureGate(t *testing.T, tf func(t *testing.T), gates ...featuregat
for _, fg := range gates {
for _, f := range []bool{true, false} {
func() {
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, fg, f)()
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, fg, f)
t.Run(fmt.Sprintf("%v (%t)", fg, f), tf)
}()
}