diff options
author | Srivahni Chivukula <srivahni.chivukula@intel.com> | 2020-02-21 10:08:04 -0800 |
---|---|---|
committer | Srivahni Chivukula <srivahni.chivukula@intel.com> | 2020-03-12 19:01:25 +0000 |
commit | def02dfebada38bde91dc98db85eff3d8923a923 (patch) | |
tree | 8888dc51acadb7c42fcfd0dedc2dbd6674802446 /src/orchestrator/api/controllerhandler_test.go | |
parent | af34fbc0e67668723eb69a800165f6bfb5100dbf (diff) |
Add apps under composite app API
Implemented create, get and delete
handlers for the apps under composite
app.
Added unit tests
Added remove function to mockdb
Handled multipart POST request to
upload file along with app data.
Issue-ID: MULTICLOUD-998
Signed-off-by: Srivahni Chivukula <srivahni.chivukula@intel.com>
Change-Id: I25c1faba1212c0cc881c2cd599e8e66a7b93033e
Diffstat (limited to 'src/orchestrator/api/controllerhandler_test.go')
-rw-r--r-- | src/orchestrator/api/controllerhandler_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/orchestrator/api/controllerhandler_test.go b/src/orchestrator/api/controllerhandler_test.go index ab0aeed8..3c543cb8 100644 --- a/src/orchestrator/api/controllerhandler_test.go +++ b/src/orchestrator/api/controllerhandler_test.go @@ -110,7 +110,7 @@ func TestControllerCreateHandler(t *testing.T) { for _, testCase := range testCases { t.Run(testCase.label, func(t *testing.T) { request := httptest.NewRequest("POST", "/v2/controllers", testCase.reader) - resp := executeRequest(request, NewRouter(nil, nil, testCase.controllerClient, nil, nil, nil, nil, nil, nil, nil)) + resp := executeRequest(request, NewRouter(nil, nil, nil, testCase.controllerClient, nil, nil, nil, nil, nil, nil, nil)) //Check returned code if resp.StatusCode != testCase.expectedCode { @@ -173,7 +173,7 @@ func TestControllerGetHandler(t *testing.T) { for _, testCase := range testCases { t.Run(testCase.label, func(t *testing.T) { request := httptest.NewRequest("GET", "/v2/controllers/"+testCase.name, nil) - resp := executeRequest(request, NewRouter(nil, nil, testCase.controllerClient, nil, nil, nil, nil, nil, nil, nil)) + resp := executeRequest(request, NewRouter(nil, nil, nil, testCase.controllerClient, nil, nil, nil, nil, nil, nil, nil)) //Check returned code if resp.StatusCode != testCase.expectedCode { @@ -222,7 +222,7 @@ func TestControllerDeleteHandler(t *testing.T) { for _, testCase := range testCases { t.Run(testCase.label, func(t *testing.T) { request := httptest.NewRequest("DELETE", "/v2/controllers/"+testCase.name, nil) - resp := executeRequest(request, NewRouter(nil, nil, testCase.controllerClient, nil, nil, nil, nil, nil, nil, nil)) + resp := executeRequest(request, NewRouter(nil, nil, nil, testCase.controllerClient, nil, nil, nil, nil, nil, nil, nil)) //Check returned code if resp.StatusCode != testCase.expectedCode { |