X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=cmd%2Fvespamgr%2Fvespamgr_test.go;fp=cmd%2Fvespamgr%2Fvespamgr_test.go;h=aa65db4b2972e4ee24939e15473e44319ced35bb;hb=e3d0c380a0a0191c31d3b66e59747ab496d50f6e;hp=9a9ca853838425198bc02a7f0870b0e8c6c1d48b;hpb=5a801c62183640699f06f2885e81b10eca187e51;p=ric-plt%2Fvespamgr.git diff --git a/cmd/vespamgr/vespamgr_test.go b/cmd/vespamgr/vespamgr_test.go index 9a9ca85..aa65db4 100755 --- a/cmd/vespamgr/vespamgr_test.go +++ b/cmd/vespamgr/vespamgr_test.go @@ -169,12 +169,19 @@ func (suite *VespaMgrTestSuite) TestCreateConf() { } func (suite *VespaMgrTestSuite) TestHandleMeasurements() { - data, err := ioutil.ReadFile("../../test/xApp_config_test_output.json") - suite.Nil(err) + data, err := ioutil.ReadFile("../../test/xApp_config_test_output.json") + suite.Nil(err) - pbodyEn, _ := json.Marshal(data) - req, _ := http.NewRequest("POST", "/ric/v1/measurements", bytes.NewBuffer(pbodyEn)) - handleFunc := http.HandlerFunc(suite.vespaMgr.HandleMeasurements) + pbodyEn, _ := json.Marshal(data) + req, _ := http.NewRequest("POST", "/ric/v1/measurements", bytes.NewBuffer(pbodyEn)) + handleFunc := http.HandlerFunc(suite.vespaMgr.HandleMeasurements) response := executeRequest(req, handleFunc) - suite.Equal(http.StatusOK, response.Code) + suite.Equal(http.StatusOK, response.Code) +} + +func (suite *VespaMgrTestSuite) TestSymptomDataHandler() { + req, _ := http.NewRequest("GET", "/ric/v1/symptomdata", nil) + handleFunc := http.HandlerFunc(suite.vespaMgr.SymptomDataHandler) + resp := executeRequest(req, handleFunc) + suite.Equal(http.StatusOK, resp.Code) }