Skip to content

Commit

Permalink
Unit test fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
akgalwas committed Mar 22, 2024
1 parent 3f542e8 commit 6dabb41
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,12 @@ func TestCompassConnectionController(t *testing.T) {
// given
clearMockCalls(&configurationClientMock.Mock)
configurationClientMock.On("FetchConfiguration", requestIDCtxMatcher).Return(nil, nil, errors.New("error"))
configurationClientMock.On("SetRuntimeStatusCondition", mock.Anything, graphql.RuntimeStatusConditionConnected).Return(nil)

// when
err = waitFor(checkInterval, testTimeout, func() bool {
return mockFunctionCalled(&configurationClientMock.Mock, "FetchConfiguration", requestIDCtxMatcher)
return mockFunctionCalled(&configurationClientMock.Mock, "FetchConfiguration", requestIDCtxMatcher) &&
mockFunctionCalled(&configurationClientMock.Mock, "SetRuntimeStatusCondition", mock.Anything, graphql.RuntimeStatusConditionConnected)
})

// then
Expand Down

0 comments on commit 6dabb41

Please sign in to comment.