Code Review
/
ric-plt
/
appmgr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add a new API to return the list of undeployed xApps
[ric-plt/appmgr.git]
/
cmd
/
appmgr
/
api_test.go
diff --git
a/cmd/appmgr/api_test.go
b/cmd/appmgr/api_test.go
index
89e4a08
..
248ffee
100755
(executable)
--- a/
cmd/appmgr/api_test.go
+++ b/
cmd/appmgr/api_test.go
@@
-55,6
+55,10
@@
func (h *MockedHelmer) StatusAll() ([]Xapp, error) {
return xapps, helmError
}
return xapps, helmError
}
+func (h *MockedHelmer) SearchAll() (s []string) {
+ return s
+}
+
func (h *MockedHelmer) List() (names []string, err error) {
return names, helmError
}
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) {
// Test cases
func TestMain(m *testing.M) {
+ Logger = NewLogger("xapp-manager")
loadConfig()
xapp = Xapp{}
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)
req, _ := http.NewRequest("DELETE", "/ric/v1/config", bytes.NewBuffer(payload))
response := executeRequest(req)
- checkResponseCode(t, http.StatusNo
tFound
, response.Code)
+ checkResponseCode(t, http.StatusNo
Content
, response.Code)
}
// Error handling
}
// Error handling