From 3f542e8527d9945c9b6b698e2699549139716ea5 Mon Sep 17 00:00:00 2001 From: Arkadiusz Galwas Date: Thu, 21 Mar 2024 16:44:43 +0100 Subject: [PATCH] Unit test fix --- .../internal/compassconnection/package_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/compass-runtime-agent/internal/compassconnection/package_test.go b/components/compass-runtime-agent/internal/compassconnection/package_test.go index 6291e1d8a519..8e2e36b50e01 100644 --- a/components/compass-runtime-agent/internal/compassconnection/package_test.go +++ b/components/compass-runtime-agent/internal/compassconnection/package_test.go @@ -296,12 +296,14 @@ func TestCompassConnectionController(t *testing.T) { // restore previous director mock configuration to not interfere with other tests configurationClientMock.On("FetchConfiguration", requestIDCtxMatcher).Return(kymaModelApps, graphql.Labels{}, nil) configurationClientMock.On("SetURLsLabels", requestIDCtxMatcher, runtimeURLsConfig, graphql.Labels{}).Return(runtimeLabels, nil) + configurationClientMock.On("SetRuntimeStatusCondition", mock.Anything, graphql.RuntimeStatusConditionConnected).Return(nil) }) t.Run("Compass Connection should be in ResourceApplicationFailed state if failed to apply resources", func(t *testing.T) { // given clearMockCalls(&synchronizationServiceMock.Mock) synchronizationServiceMock.On("Apply", kymaModelApps).Return(nil, apperrors.Internal("error")) + configurationClientMock.On("SetRuntimeStatusCondition", mock.Anything, graphql.RuntimeStatusConditionConnected).Return(nil) // when err = waitFor(checkInterval, testTimeout, func() bool {