Added fatalf for error handling

Signed-off-by: Dipankar Das <dipankardas0115@gmail.com>
This commit is contained in:
Dipankar Das 2023-01-07 15:45:45 +05:30
parent 7eb9a75bf9
commit 526b4b4ce2

View File

@ -252,13 +252,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 featureGate with Release as Alpha")
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 Set key ValidateAdmissionPolicy to the Alpha featureGate")
panic("Unexpected error.")
} }
plug, err := NewPlugin() plug, err := NewPlugin()