Skip to content

Commit

Permalink
remove redundant unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Catalin Stratulat <[email protected]>
  • Loading branch information
Catalin-Stratulat-Ericsson committed Feb 26, 2024
1 parent 794d021 commit 2921c51
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions controllers/pkg/resource/error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,41 +136,6 @@ func TestIgnoreNotFound(t *testing.T) {
}
}

func TestIsAPIError(t *testing.T) {
errBoom := errors.New("boom")
k8sError := kerrors.NewBadRequest("BadRequest Reason")

type args struct {
err error
}
cases := map[string]struct {
args args
want bool
}{
"isKubernetesAPIError": {
args: args{
err: k8sError,
},
want: true,
},
"isNotKubernetesAPIError": {
args: args{
err: errBoom,
},
want: false,
},
}

for name, tc := range cases {
t.Run(name, func(t *testing.T) {
got := IsAPIError(tc.args.err)
if diff := cmp.Diff(tc.want, got, EquateErrors()); diff != "" {
t.Errorf("Ignore(...): -want %t, +got error:\n%s", tc.want, diff)
}
})
}
}

func TestIsAPIErrorWrapped(t *testing.T) {
errBoom := errors.New("boom")
k8sError := kerrors.NewBadRequest("BadRequest Reason")
Expand Down

0 comments on commit 2921c51

Please sign in to comment.