Skip to content

Commit 248df53

Browse files
committed
Remove nil error checks
1 parent ce0960b commit 248df53

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

tests/cel/clientsettingspolicy_test.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,16 +185,10 @@ func validateClientSettingsPolicy(t *testing.T, tt struct {
185185

186186
// Check if we expected errors
187187
if len(tt.wantErrors) == 0 {
188-
if err != nil {
189-
g.Expect(err).ToNot(HaveOccurred())
190-
}
191-
return
188+
g.Expect(err).ToNot(HaveOccurred())
192189
}
193190

194-
// We expected errors - validation should have failed
195-
if err == nil {
196-
g.Expect(err).To(HaveOccurred())
197-
}
191+
g.Expect(err).To(HaveOccurred())
198192

199193
// Check that we got the expected error messages
200194
for _, wantError := range tt.wantErrors {

0 commit comments

Comments
 (0)