mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-27 07:34:04 +00:00
client-go/features: add Set method to envvar impl
Kubernetes-commit: a07654baa54d53d7649e981c0c65eb8d1210e4af
This commit is contained in:
committed by
Kubernetes Publisher
parent
b92b563c44
commit
98df4f79ac
@@ -30,6 +30,15 @@ func TestAddFeaturesToExistingFeatureGates(t *testing.T) {
|
||||
require.Equal(t, defaultKubernetesFeatureGates, fakeFeatureGates.specs)
|
||||
}
|
||||
|
||||
func TestReplaceFeatureGatesWithWarningIndicator(t *testing.T) {
|
||||
defaultFeatureGates := FeatureGates()
|
||||
require.Panics(t, func() { defaultFeatureGates.Enabled("Foo") }, "reading an unregistered feature gate Foo should panic")
|
||||
|
||||
if !replaceFeatureGatesWithWarningIndicator(defaultFeatureGates) {
|
||||
t.Error("replacing the default feature gates after reading a value hasn't produced a warning")
|
||||
}
|
||||
}
|
||||
|
||||
type fakeRegistry struct {
|
||||
specs map[Feature]FeatureSpec
|
||||
}
|
||||
|
Reference in New Issue
Block a user