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

View File

@@ -275,13 +275,11 @@ func setupTestCommon(t *testing.T, compiler ValidatorCompiler, shouldStartInform
features.ValidatingAdmissionPolicy: {
Default: true, PreRelease: featuregate.Alpha}})
if err != nil {
// FIXME: handle error.
panic("Unexpected error")
t.Fatalf("Unable to add feature gate: %v", err)
}
err = featureGate.SetFromMap(map[string]bool{string(features.ValidatingAdmissionPolicy): true})
if err != nil {
// FIXME: handle error.
panic("Unexpected error.")
t.Fatalf("Unable to store flag gate: %v", err)
}
plug, err := NewPlugin()