From 17275e9b6899ba611458f8ca9aaa868c70d7d0cf Mon Sep 17 00:00:00 2001 From: Kiran Kamineni Date: Thu, 24 Jan 2019 15:40:12 -0800 Subject: Bring in all the other helper code Bring in all the helper functions added for end to end integration. This allows the api level upload of helm charts, profiles and also instantiation of said helm charts. P3: Plugin index is based on lowercase kind name whereas the map contains the correct case for kind. Convert to lower case before loading the plugin. Changes after rebasing on the new folder structure. Rebasing over the new folder structure P8: Add unit tests for Resolve function Fix the integration tests for createvnf I had to add a huge blob of base64 encoded data based on the profile and sample helm chart to test the flow. P12: Update the integration test with the rb_profile_id parameter Issue-ID: MULTICLOUD-291 Change-Id: If04c41cb185074989ab6c96557958140c43e456d Signed-off-by: Kiran Kamineni --- src/k8splugin/api/handler_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/k8splugin/api/handler_test.go') diff --git a/src/k8splugin/api/handler_test.go b/src/k8splugin/api/handler_test.go index 2bac3111..c34ceec8 100644 --- a/src/k8splugin/api/handler_test.go +++ b/src/k8splugin/api/handler_test.go @@ -98,7 +98,7 @@ func TestCreateHandler(t *testing.T) { label: "Fail to get the VNF client", input: bytes.NewBuffer([]byte(`{ "cloud_region_id": "region1", - "namespace": "test", + "rb_profile_id": "123e4567-e89b-12d3-a456-426655440000", "csar_id": "UUID-1" }`)), expectedCode: http.StatusInternalServerError, @@ -108,7 +108,7 @@ func TestCreateHandler(t *testing.T) { label: "Fail to create the VNF instance", input: bytes.NewBuffer([]byte(`{ "cloud_region_id": "region1", - "namespace": "test", + "rb_profile_id": "123e4567-e89b-12d3-a456-426655440000", "csar_id": "UUID-1" }`)), expectedCode: http.StatusInternalServerError, @@ -120,7 +120,7 @@ func TestCreateHandler(t *testing.T) { label: "Fail to create a VNF DB record", input: bytes.NewBuffer([]byte(`{ "cloud_region_id": "region1", - "namespace": "test", + "rb_profile_id": "123e4567-e89b-12d3-a456-426655440000", "csar_id": "UUID-1" }`)), expectedCode: http.StatusInternalServerError, @@ -135,7 +135,7 @@ func TestCreateHandler(t *testing.T) { label: "Succesful create a VNF", input: bytes.NewBuffer([]byte(`{ "cloud_region_id": "region1", - "namespace": "test", + "rb_profile_id": "123e4567-e89b-12d3-a456-426655440000", "csar_id": "UUID-1" }`)), expectedCode: http.StatusCreated, -- cgit 1.2.3-korg