X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fusecases%2Foruclosedlooprecovery%2Fgoversion%2Finternal%2Flinkfailure%2Flinkfailurehandler_test.go;h=a3df7044b01d34a2ba7e755df8a8151fca0a27ca;hb=c658d388f93467cb1a1229d11a0e01616cd97e3c;hp=9653c993c30e63390e3a16eef8cbfb491b476f6d;hpb=2f0d0d08efe5efe671178e63fdab4dacee543f9a;p=nonrtric.git diff --git a/test/usecases/oruclosedlooprecovery/goversion/internal/linkfailure/linkfailurehandler_test.go b/test/usecases/oruclosedlooprecovery/goversion/internal/linkfailure/linkfailurehandler_test.go index 9653c993..a3df7044 100644 --- a/test/usecases/oruclosedlooprecovery/goversion/internal/linkfailure/linkfailurehandler_test.go +++ b/test/usecases/oruclosedlooprecovery/goversion/internal/linkfailure/linkfailurehandler_test.go @@ -34,7 +34,6 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "oransc.org/usecase/oruclosedloop/internal/repository" - "oransc.org/usecase/oruclosedloop/internal/restclient" "oransc.org/usecase/oruclosedloop/internal/ves" "oransc.org/usecase/oruclosedloop/mocks" ) @@ -55,8 +54,6 @@ func Test_MessagesHandlerWithLinkFailure(t *testing.T) { StatusCode: http.StatusOK, }, nil) - restclient.Client = &clientMock - lookupServiceMock := mocks.LookupService{} lookupServiceMock.On("GetODuID", mock.Anything).Return("HCL-O-DU-1122", nil) @@ -65,7 +62,7 @@ func Test_MessagesHandlerWithLinkFailure(t *testing.T) { SDNRAddress: "http://localhost:9990", SDNRUser: "admin", SDNRPassword: "pwd", - }) + }, &clientMock) responseRecorder := httptest.NewRecorder() r := newRequest(http.MethodPost, "/", getFaultMessage("ERICSSON-O-RU-11220", "CRITICAL"), t) @@ -122,7 +119,7 @@ func Test_MessagesHandlerWithClearLinkFailure(t *testing.T) { lookupServiceMock.On("GetODuID", mock.Anything).Return("HCL-O-DU-1122", nil) - handlerUnderTest := NewLinkFailureHandler(&lookupServiceMock, Configuration{}) + handlerUnderTest := NewLinkFailureHandler(&lookupServiceMock, Configuration{}, nil) responseRecorder := httptest.NewRecorder() r := newRequest(http.MethodPost, "/", getFaultMessage("ERICSSON-O-RU-11220", "NORMAL"), t) @@ -151,7 +148,7 @@ func Test_MessagesHandlerWithLinkFailureUnmappedORU(t *testing.T) { Id: "ERICSSON-O-RU-11220", }) - handlerUnderTest := NewLinkFailureHandler(&lookupServiceMock, Configuration{}) + handlerUnderTest := NewLinkFailureHandler(&lookupServiceMock, Configuration{}, nil) responseRecorder := httptest.NewRecorder() r := newRequest(http.MethodPost, "/", getFaultMessage("ERICSSON-O-RU-11220", "CRITICAL"), t)