Skip to content

Commit 00a47a0

Browse files
author
Mauricio Bonetti
committed
issues/1449 - Update healthcheck tests to use gomock.Not(gomock.Nil()) for improved mock validation
1 parent 2495c20 commit 00a47a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/api/v1/healtcheck_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func TestGetHealthcheck(t *testing.T) {
3232

3333
// Setup mock to return nil (no error) when IsRunning is called
3434
mockRuntime.EXPECT().
35-
IsRunning(gomock.Any()).
35+
IsRunning(gomock.Not(gomock.Nil())).
3636
Return(nil)
3737

3838
// Create a test request and response recorder
@@ -55,7 +55,7 @@ func TestGetHealthcheck(t *testing.T) {
5555

5656
// Setup mock to return an error when IsRunning is called
5757
mockRuntime.EXPECT().
58-
IsRunning(gomock.Any()).
58+
IsRunning(gomock.Not(gomock.Nil())).
5959
Return(expectedError)
6060

6161
// Create a test request and response recorder

0 commit comments

Comments
 (0)