X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2Fmocks%2FcontrollerMock.go;h=7575f72994be83cfa5b96375c192aa561c6d81c6;hb=refs%2Fchanges%2F32%2F1432%2F2;hp=5393a55f630afb1efa742745ead834ff93933668;hpb=33f84e1a0998af025880be3e8eb087fac34af731;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/mocks/controllerMock.go b/E2Manager/mocks/controllerMock.go index 5393a55..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) Shutdown(writer http.ResponseWriter, r *http.Request){ c.Called() } -func (c *ControllerMock) X2ResetHandler(writer http.ResponseWriter, r *http.Request){ +func (c *ControllerMock) X2Reset(writer http.ResponseWriter, r *http.Request){ writer.Header().Set("Content-Type", "application/json") writer.WriteHeader(http.StatusOK) @@ -26,14 +43,14 @@ func (c *ControllerMock) X2ResetHandler(writer http.ResponseWriter, r *http.Requ c.Called() } -func (c *ControllerMock) X2SetupHandler(writer http.ResponseWriter, r *http.Request){ +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) EndcSetupHandler(writer http.ResponseWriter, r *http.Request){ +func (c *ControllerMock) EndcSetup(writer http.ResponseWriter, r *http.Request){ writer.Header().Set("Content-Type", "application/json") writer.WriteHeader(http.StatusOK)