mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #114894 from dipankardas011/validate-admission-policy-error-handling
Added error handling in ValidateAdmissionPolicy
This commit is contained in:
commit
1ded677b2a
@ -275,13 +275,11 @@ func setupTestCommon(t *testing.T, compiler ValidatorCompiler, shouldStartInform
|
|||||||
features.ValidatingAdmissionPolicy: {
|
features.ValidatingAdmissionPolicy: {
|
||||||
Default: true, PreRelease: featuregate.Alpha}})
|
Default: true, PreRelease: featuregate.Alpha}})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// FIXME: handle error.
|
t.Fatalf("Unable to add feature gate: %v", err)
|
||||||
panic("Unexpected error")
|
|
||||||
}
|
}
|
||||||
err = featureGate.SetFromMap(map[string]bool{string(features.ValidatingAdmissionPolicy): true})
|
err = featureGate.SetFromMap(map[string]bool{string(features.ValidatingAdmissionPolicy): true})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// FIXME: handle error.
|
t.Fatalf("Unable to store flag gate: %v", err)
|
||||||
panic("Unexpected error.")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
plug, err := NewPlugin()
|
plug, err := NewPlugin()
|
||||||
|
Loading…
Reference in New Issue
Block a user