Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetFeatureGateDuringTest ¶
func SetFeatureGateDuringTest(tb testing.TB, gate featuregate.FeatureGate, f featuregate.Feature, value bool)
SetFeatureGateDuringTest sets the specified gate to the specified value for duration of the test. Fails when it detects second call to the same flag or is unable to set or restore feature flag.
WARNING: Can leak set variable when called in test calling t.Parallel(), however second attempt to set the same feature flag will cause fatal.
Example use:
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.<FeatureName>, true)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.