diff options
author | Konrad Bańka <k.banka@samsung.com> | 2021-02-25 00:08:05 +0100 |
---|---|---|
committer | Konrad Bańka <k.banka@samsung.com> | 2021-02-25 15:30:45 +0100 |
commit | 22a37f42a54c1acd2f095bc559ab03745e5ae7f9 (patch) | |
tree | 18be25e5475c5bf8d00d2e43a734d4eca2658a7b /src/k8splugin/api/defhandler_test.go | |
parent | fec64d4a5d7986e4d92b1350f31c9a3c81e82e6e (diff) |
Provide Healthcheck API MVP0.8.0
Implements basic functionality of running starting Healthcheck.
Results can be inspected so-far without dedicated API, by using, for
example, Query API.
Issue-ID: MULTICLOUD-1233
Signed-off-by: Konrad Bańka <k.banka@samsung.com>
Change-Id: Ia4d96d936d573173d7d8f41e6c39d059bf5f8b1f
Diffstat (limited to 'src/k8splugin/api/defhandler_test.go')
-rw-r--r-- | src/k8splugin/api/defhandler_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/k8splugin/api/defhandler_test.go b/src/k8splugin/api/defhandler_test.go index dcfea1de..bb2f9dc4 100644 --- a/src/k8splugin/api/defhandler_test.go +++ b/src/k8splugin/api/defhandler_test.go @@ -139,7 +139,7 @@ func TestRBDefCreateHandler(t *testing.T) { for _, testCase := range testCases { t.Run(testCase.label, func(t *testing.T) { request := httptest.NewRequest("POST", "/v1/rb/definition", testCase.reader) - resp := executeRequest(request, NewRouter(testCase.rbDefClient, nil, nil, nil, nil, nil)) + resp := executeRequest(request, NewRouter(testCase.rbDefClient, nil, nil, nil, nil, nil, nil)) //Check returned code if resp.StatusCode != testCase.expectedCode { @@ -208,7 +208,7 @@ func TestRBDefListVersionsHandler(t *testing.T) { for _, testCase := range testCases { t.Run(testCase.label, func(t *testing.T) { request := httptest.NewRequest("GET", "/v1/rb/definition/testresourcebundle", nil) - resp := executeRequest(request, NewRouter(testCase.rbDefClient, nil, nil, nil, nil, nil)) + resp := executeRequest(request, NewRouter(testCase.rbDefClient, nil, nil, nil, nil, nil, nil)) //Check returned code if resp.StatusCode != testCase.expectedCode { @@ -288,7 +288,7 @@ func TestRBDefListAllHandler(t *testing.T) { for _, testCase := range testCases { t.Run(testCase.label, func(t *testing.T) { request := httptest.NewRequest("GET", "/v1/rb/definition", nil) - resp := executeRequest(request, NewRouter(testCase.rbDefClient, nil, nil, nil, nil, nil)) + resp := executeRequest(request, NewRouter(testCase.rbDefClient, nil, nil, nil, nil, nil, nil)) //Check returned code if resp.StatusCode != testCase.expectedCode { @@ -368,7 +368,7 @@ func TestRBDefGetHandler(t *testing.T) { for _, testCase := range testCases { t.Run(testCase.label, func(t *testing.T) { request := httptest.NewRequest("GET", "/v1/rb/definition/"+testCase.name+"/"+testCase.version, nil) - resp := executeRequest(request, NewRouter(testCase.rbDefClient, nil, nil, nil, nil, nil)) + resp := executeRequest(request, NewRouter(testCase.rbDefClient, nil, nil, nil, nil, nil, nil)) //Check returned code if resp.StatusCode != testCase.expectedCode { @@ -419,7 +419,7 @@ func TestRBDefDeleteHandler(t *testing.T) { for _, testCase := range testCases { t.Run(testCase.label, func(t *testing.T) { request := httptest.NewRequest("DELETE", "/v1/rb/definition/"+testCase.name+"/"+testCase.version, nil) - resp := executeRequest(request, NewRouter(testCase.rbDefClient, nil, nil, nil, nil, nil)) + resp := executeRequest(request, NewRouter(testCase.rbDefClient, nil, nil, nil, nil, nil, nil)) //Check returned code if resp.StatusCode != testCase.expectedCode { @@ -476,7 +476,7 @@ func TestRBDefUploadHandler(t *testing.T) { t.Run(testCase.label, func(t *testing.T) { request := httptest.NewRequest("POST", "/v1/rb/definition/"+testCase.name+"/"+testCase.version+"/content", testCase.body) - resp := executeRequest(request, NewRouter(testCase.rbDefClient, nil, nil, nil, nil, nil)) + resp := executeRequest(request, NewRouter(testCase.rbDefClient, nil, nil, nil, nil, nil, nil)) //Check returned code if resp.StatusCode != testCase.expectedCode { |