Add a new API to return the list of undeployed xApps
[ric-plt/appmgr.git] / cmd / appmgr / api_test.go
index 89e4a08..248ffee 100755 (executable)
@@ -55,6 +55,10 @@ func (h *MockedHelmer) StatusAll() ([]Xapp, error) {
        return xapps, helmError
 }
 
+func (h *MockedHelmer) SearchAll() (s []string) {
+       return s
+}
+
 func (h *MockedHelmer) List() (names []string, err error) {
        return names, helmError
 }
@@ -69,6 +73,7 @@ func (h *MockedHelmer) Delete(name string) (Xapp, error) {
 
 // Test cases
 func TestMain(m *testing.M) {
+       Logger = NewLogger("xapp-manager")
        loadConfig()
 
        xapp = Xapp{}
@@ -185,7 +190,7 @@ func TestDeleteConfigOk(t *testing.T) {
        req, _ := http.NewRequest("DELETE", "/ric/v1/config", bytes.NewBuffer(payload))
        response := executeRequest(req)
 
-       checkResponseCode(t, http.StatusNotFound, response.Code)
+       checkResponseCode(t, http.StatusNoContent, response.Code)
 }
 
 // Error handling