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: {
Default: true, PreRelease: featuregate.Alpha}})
if err != nil {
// FIXME: handle error.
panic("Unexpected error")
t.Fatalf("Unable to add featureGate with Release as Alpha")
}
err = featureGate.SetFromMap(map[string]bool{string(features.ValidatingAdmissionPolicy): true})
if err != nil {
// FIXME: handle error.
panic("Unexpected error.")
t.Fatalf("Unable to Set key ValidateAdmissionPolicy to the Alpha featureGate")
}
plug, err := NewPlugin()