-func TestGetConfigReturnsEmpty(t *testing.T) {
- req, _ := http.NewRequest("GET", "/ric/v1/config", nil)
- response := executeRequest(req)
-
- checkResponseCode(t, http.StatusOK, response.Code)
-}
-
-func TestCreateConfigFailsWithMethodNotAllowed(t *testing.T) {
- req, _ := http.NewRequest("POST", "/ric/v1/config", nil)
- response := executeRequest(req)
-
- checkResponseCode(t, http.StatusMethodNotAllowed, response.Code)
-}
-
-func TestCreateConfigOk(t *testing.T) {
- payload := []byte(`{"name":"dummy-xapp"}`)
- req, _ := http.NewRequest("POST", "/ric/v1/config", bytes.NewBuffer(payload))
- response := executeRequest(req)
-
- checkResponseCode(t, http.StatusCreated, response.Code)
-}
-
-func TestDeleteConfigOk(t *testing.T) {
- payload := []byte(`{"name":"dummy-xapp"}`)
- req, _ := http.NewRequest("DELETE", "/ric/v1/config", bytes.NewBuffer(payload))
- response := executeRequest(req)
-
- checkResponseCode(t, http.StatusNotFound, response.Code)
-}
-