Skip to content

Commit eb837ee

Browse files
committed
fix: nil check before log
1 parent 7c077a1 commit eb837ee

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/e2e/helper_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,10 @@ func (l *lbTestHelper) TearDown() {
330330
}
331331
return k8serrors.IsNotFound(err), nil
332332
})
333-
// The cluster is deleted afterward, so we can info log this error
334-
l.t.Logf("error tearing down test namespace: %v", err)
333+
if err != nil {
334+
// The cluster is deleted afterward, so we can info log this error
335+
l.t.Logf("error tearing down test namespace: %v", err)
336+
}
335337
}
336338

337339
// WaitForHTTPAvailable tries to connect to the given IP via HTTP or HTTPS

0 commit comments

Comments
 (0)