Skip to content

Commit

Permalink
Unit test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
akgalwas committed Mar 21, 2024
1 parent bf301c8 commit 3f542e8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3f542e8

Please sign in to comment.