From 6dabb4116802d08b31430150d908690e037a2a03 Mon Sep 17 00:00:00 2001 From: Arkadiusz Galwas Date: Fri, 22 Mar 2024 12:05:37 +0100 Subject: [PATCH] Unit test fixed --- .../internal/compassconnection/package_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/compass-runtime-agent/internal/compassconnection/package_test.go b/components/compass-runtime-agent/internal/compassconnection/package_test.go index 8e2e36b50e01..a69d69a55fc4 100644 --- a/components/compass-runtime-agent/internal/compassconnection/package_test.go +++ b/components/compass-runtime-agent/internal/compassconnection/package_test.go @@ -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