diff options
author | Bin Yang <bin.yang@windriver.com> | 2019-07-16 00:52:24 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-07-16 00:52:24 +0000 |
commit | ba4a7991e10172a31cec65ae5c9ad11cbb1b806b (patch) | |
tree | c4e14b0cc27dece033e672833ec2040120ef77cb /src/k8splugin/api/profilehandler_test.go | |
parent | 70f54e61d7081507760a8d876e13b2088f9ff58f (diff) | |
parent | 6b911a5168a72e8659309db7349750cdec6eb8d2 (diff) |
Merge "Move connectionhandler.go into api package"
Diffstat (limited to 'src/k8splugin/api/profilehandler_test.go')
-rw-r--r-- | src/k8splugin/api/profilehandler_test.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/k8splugin/api/profilehandler_test.go b/src/k8splugin/api/profilehandler_test.go index eb65827a..e81fb262 100644 --- a/src/k8splugin/api/profilehandler_test.go +++ b/src/k8splugin/api/profilehandler_test.go @@ -20,12 +20,13 @@ import ( "bytes" "encoding/json" "io" - "github.com/onap/multicloud-k8s/src/k8splugin/internal/rb" "net/http" "net/http/httptest" "reflect" "testing" + "github.com/onap/multicloud-k8s/src/k8splugin/internal/rb" + pkgerrors "github.com/pkg/errors" ) @@ -117,7 +118,7 @@ func TestRBProfileCreateHandler(t *testing.T) { t.Run(testCase.label, func(t *testing.T) { request := httptest.NewRequest("POST", "/v1/rb/definition/test-rbdef/v1/profile", testCase.reader) - resp := executeRequest(request, NewRouter(nil, testCase.rbProClient, nil, nil, nil)) + resp := executeRequest(request, NewRouter(nil, testCase.rbProClient, nil, nil, nil, nil)) //Check returned code if resp.StatusCode != testCase.expectedCode { @@ -188,7 +189,7 @@ func TestRBProfileGetHandler(t *testing.T) { for _, testCase := range testCases { t.Run(testCase.label, func(t *testing.T) { request := httptest.NewRequest("GET", "/v1/rb/definition/test-rbdef/v1/profile/"+testCase.prname, nil) - resp := executeRequest(request, NewRouter(nil, testCase.rbProClient, nil, nil, nil)) + resp := executeRequest(request, NewRouter(nil, testCase.rbProClient, nil, nil, nil, nil)) //Check returned code if resp.StatusCode != testCase.expectedCode { @@ -236,7 +237,7 @@ func TestRBProfileDeleteHandler(t *testing.T) { for _, testCase := range testCases { t.Run(testCase.label, func(t *testing.T) { request := httptest.NewRequest("DELETE", "/v1/rb/definition/test-rbdef/v1/profile/"+testCase.prname, nil) - resp := executeRequest(request, NewRouter(nil, testCase.rbProClient, nil, nil, nil)) + resp := executeRequest(request, NewRouter(nil, testCase.rbProClient, nil, nil, nil, nil)) //Check returned code if resp.StatusCode != testCase.expectedCode { @@ -289,7 +290,7 @@ func TestRBProfileUploadHandler(t *testing.T) { t.Run(testCase.label, func(t *testing.T) { request := httptest.NewRequest("POST", "/v1/rb/definition/test-rbdef/v1/profile/"+testCase.prname+"/content", testCase.body) - resp := executeRequest(request, NewRouter(nil, testCase.rbProClient, nil, nil, nil)) + resp := executeRequest(request, NewRouter(nil, testCase.rbProClient, nil, nil, nil, nil)) //Check returned code if resp.StatusCode != testCase.expectedCode { |