Merge pull request #114894 from dipankardas011/validate-admission-policy-error-handling

Added error handling in ValidateAdmissionPolicy
This commit is contained in:
Kubernetes Prow Robot 2023-02-03 12:14:30 -08:00 committed by GitHub
commit 1ded677b2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()