Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Commit 1b9864a

Browse files
committed
linter: remove redundant error checks
Signed-off-by: Cody Soyland <[email protected]>
1 parent d8993d4 commit 1b9864a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/webhook/validator_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3032,7 +3032,7 @@ func TestFulcioCertsFromAuthority(t *testing.T) {
30323032
} else if err.Error() != tc.wantErr {
30333033
t.Errorf("unexpected error: %v wanted %q", err, tc.wantErr)
30343034
}
3035-
} else if err == nil && tc.wantErr != "" {
3035+
} else if tc.wantErr != "" {
30363036
t.Errorf("wanted error: %q got none", tc.wantErr)
30373037
}
30383038
if !roots.Equal(tc.wantRoots) {
@@ -3140,7 +3140,7 @@ func TestRekorClientAndKeysFromAuthority(t *testing.T) {
31403140
} else if err.Error() != tc.wantErr {
31413141
t.Errorf("unexpected error: %v wanted %q", err, tc.wantErr)
31423142
}
3143-
} else if err == nil && tc.wantErr != "" {
3143+
} else if tc.wantErr != "" {
31443144
t.Errorf("wanted error: %q got none", tc.wantErr)
31453145
}
31463146
if tc.wantLogID != "" {
@@ -3370,7 +3370,7 @@ func TestCheckOptsFromAuthority(t *testing.T) {
33703370
} else if err.Error() != tc.wantErr {
33713371
t.Errorf("unexpected error: %v wanted %q", err, tc.wantErr)
33723372
}
3373-
} else if err == nil && tc.wantErr != "" {
3373+
} else if tc.wantErr != "" {
33743374
t.Errorf("wanted error: %q got none", tc.wantErr)
33753375
}
33763376
if tc.wantClient && (gotCheckOpts == nil || gotCheckOpts.RekorClient == nil) {

0 commit comments

Comments
 (0)