X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2Fmocks%2FcontrollerMock.go;h=7575f72994be83cfa5b96375c192aa561c6d81c6;hb=1724b6d2bf37ae07552f9aecc3e86a860efd6ac3;hp=390005cb431edb59f2557b658aa10e063fd4bd97;hpb=4db397dbfa07d202f1a7134e1a7a52b8fb3b5d8a;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/mocks/controllerMock.go b/E2Manager/mocks/controllerMock.go index 390005c..7575f72 100644 --- a/E2Manager/mocks/controllerMock.go +++ b/E2Manager/mocks/controllerMock.go @@ -10,11 +10,28 @@ type ControllerMock struct { mock.Mock } -func (c *ControllerMock) ShutdownHandler(writer http.ResponseWriter, r *http.Request){ +func (c *ControllerMock) GetNodeb(writer http.ResponseWriter, r *http.Request){ + writer.Header().Set("Content-Type", "application/json") + writer.WriteHeader(http.StatusOK) + + vars := mux.Vars(r) + ranName := vars["ranName"] + + writer.Write([]byte(ranName)) + + c.Called() +} + +func (c *ControllerMock) GetNodebIdList(writer http.ResponseWriter, r *http.Request){ c.Called() } -func (c *ControllerMock) X2ResetHandler(writer http.ResponseWriter, r *http.Request){ + +func (c *ControllerMock) Shutdown(writer http.ResponseWriter, r *http.Request){ + c.Called() +} + +func (c *ControllerMock) X2Reset(writer http.ResponseWriter, r *http.Request){ writer.Header().Set("Content-Type", "application/json") writer.WriteHeader(http.StatusOK) @@ -26,3 +43,16 @@ func (c *ControllerMock) X2ResetHandler(writer http.ResponseWriter, r *http.Requ c.Called() } +func (c *ControllerMock) X2Setup(writer http.ResponseWriter, r *http.Request){ + writer.Header().Set("Content-Type", "application/json") + writer.WriteHeader(http.StatusOK) + + c.Called() +} + +func (c *ControllerMock) EndcSetup(writer http.ResponseWriter, r *http.Request){ + writer.Header().Set("Content-Type", "application/json") + writer.WriteHeader(http.StatusOK) + + c.Called() +} \ No newline at end of file