diff options
author | Ritu Sood <Ritu.Sood@intel.com> | 2020-02-20 21:38:58 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-02-20 21:38:58 +0000 |
commit | 64f78186cfc27c151b597461d2f3e64bc308ba1b (patch) | |
tree | 3c73d2ddfc98318e67927ec166eca0d685ff7438 /src/orchestrator/api/projecthandler_test.go | |
parent | e4f7a40fd862688eebda72826498a5f358341170 (diff) | |
parent | b11b37f11fa45ab149e8a88a183b70f077c0f48e (diff) |
Merge "Add Composite Application API"
Diffstat (limited to 'src/orchestrator/api/projecthandler_test.go')
-rw-r--r-- | src/orchestrator/api/projecthandler_test.go | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/orchestrator/api/projecthandler_test.go b/src/orchestrator/api/projecthandler_test.go index ee6ed358..c76764b3 100644 --- a/src/orchestrator/api/projecthandler_test.go +++ b/src/orchestrator/api/projecthandler_test.go @@ -86,23 +86,23 @@ func TestProjectCreateHandler(t *testing.T) { }`)), expected: moduleLib.Project{ MetaData: moduleLib.ProjectMetaData{ - Name: "testProject", + Name: "testProject", Description: "Test Project used for unit testing", - UserData1: "data1", - UserData2: "data2", + UserData1: "data1", + UserData2: "data2", }, }, projectClient: &mockProjectManager{ //Items that will be returned by the mocked Client Items: []moduleLib.Project{ - moduleLib.Project{ - MetaData: moduleLib.ProjectMetaData{ - Name: "testProject", - Description: "Test Project used for unit testing", - UserData1: "data1", - UserData2: "data2", - }, - }, + moduleLib.Project{ + MetaData: moduleLib.ProjectMetaData{ + Name: "testProject", + Description: "Test Project used for unit testing", + UserData1: "data1", + UserData2: "data2", + }, + }, }, }, }, @@ -119,7 +119,7 @@ func TestProjectCreateHandler(t *testing.T) { for _, testCase := range testCases { t.Run(testCase.label, func(t *testing.T) { request := httptest.NewRequest("POST", "/v2/projects", testCase.reader) - resp := executeRequest(request, NewRouter(testCase.projectClient)) + resp := executeRequest(request, NewRouter(testCase.projectClient, nil)) //Check returned code if resp.StatusCode != testCase.expectedCode { @@ -154,23 +154,23 @@ func TestProjectGetHandler(t *testing.T) { expectedCode: http.StatusOK, expected: moduleLib.Project{ MetaData: moduleLib.ProjectMetaData{ - Name: "testProject", + Name: "testProject", Description: "Test Project used for unit testing", - UserData1: "data1", - UserData2: "data2", + UserData1: "data1", + UserData2: "data2", }, }, name: "testProject", projectClient: &mockProjectManager{ Items: []moduleLib.Project{ - moduleLib.Project{ - MetaData: moduleLib.ProjectMetaData{ - Name: "testProject", - Description: "Test Project used for unit testing", - UserData1: "data1", - UserData2: "data2", - }, - }, + moduleLib.Project{ + MetaData: moduleLib.ProjectMetaData{ + Name: "testProject", + Description: "Test Project used for unit testing", + UserData1: "data1", + UserData2: "data2", + }, + }, }, }, }, @@ -188,7 +188,7 @@ func TestProjectGetHandler(t *testing.T) { for _, testCase := range testCases { t.Run(testCase.label, func(t *testing.T) { request := httptest.NewRequest("GET", "/v2/projects/"+testCase.name, nil) - resp := executeRequest(request, NewRouter(testCase.projectClient)) + resp := executeRequest(request, NewRouter(testCase.projectClient, nil)) //Check returned code if resp.StatusCode != testCase.expectedCode { @@ -237,7 +237,7 @@ func TestProjectDeleteHandler(t *testing.T) { for _, testCase := range testCases { t.Run(testCase.label, func(t *testing.T) { request := httptest.NewRequest("DELETE", "/v2/projects/"+testCase.name, nil) - resp := executeRequest(request, NewRouter(testCase.projectClient)) + resp := executeRequest(request, NewRouter(testCase.projectClient, nil)) //Check returned code if resp.StatusCode != testCase.expectedCode { |