X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2Fmocks%2Fnodeb_controller_mock.go;h=923955a61d3cdeae5522a03bccb0194c655a38b0;hb=d2f1a29d3f1cc779045148a82729f644e6110776;hp=11130b30265ea45663a6b3389c2187f3171bb681;hpb=197657e0e814c871b903ef779ad654b13347e430;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/mocks/nodeb_controller_mock.go b/E2Manager/mocks/nodeb_controller_mock.go index 11130b3..923955a 100644 --- a/E2Manager/mocks/nodeb_controller_mock.go +++ b/E2Manager/mocks/nodeb_controller_mock.go @@ -1,6 +1,7 @@ // // Copyright 2019 AT&T Intellectual Property // Copyright 2019 Nokia +// Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -45,6 +46,17 @@ func (c *NodebControllerMock) GetNodebIdList(writer http.ResponseWriter, r *http c.Called() } +func (c *NodebControllerMock) GetNodebId(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 *NodebControllerMock) Shutdown(writer http.ResponseWriter, r *http.Request) { c.Called() } @@ -61,24 +73,29 @@ func (c *NodebControllerMock) X2Reset(writer http.ResponseWriter, r *http.Reques c.Called() } -func (c *NodebControllerMock) X2Setup(writer http.ResponseWriter, r *http.Request) { +func (c *NodebControllerMock) UpdateGnb(writer http.ResponseWriter, r *http.Request) { writer.Header().Set("Content-Type", "application/json") writer.WriteHeader(http.StatusOK) c.Called() } -func (c *NodebControllerMock) EndcSetup(writer http.ResponseWriter, r *http.Request) { +func (c *NodebControllerMock) UpdateEnb(writer http.ResponseWriter, r *http.Request) { writer.Header().Set("Content-Type", "application/json") writer.WriteHeader(http.StatusOK) c.Called() } -func (c *NodebControllerMock) UpdateGnb(writer http.ResponseWriter, r *http.Request) { +func (c *NodebControllerMock) AddEnb(writer http.ResponseWriter, r *http.Request) { writer.Header().Set("Content-Type", "application/json") - writer.WriteHeader(http.StatusOK) + writer.WriteHeader(http.StatusCreated) + c.Called() +} +func (c *NodebControllerMock) DeleteEnb(writer http.ResponseWriter, r *http.Request) { + writer.Header().Set("Content-Type", "application/json") + writer.WriteHeader(http.StatusNoContent) c.Called() } @@ -87,4 +104,11 @@ func (c *NodebControllerMock) SetGeneralConfiguration(writer http.ResponseWriter writer.WriteHeader(http.StatusOK) c.Called() -} \ No newline at end of file +} + +func (c *NodebControllerMock) HealthCheckRequest(writer http.ResponseWriter, r *http.Request) { + writer.Header().Set("Content-Type", "application/json") + writer.WriteHeader(http.StatusAccepted) + + c.Called() +}