aboutsummaryrefslogtreecommitdiffstats
path: root/src/k8splugin/api/instancehandler_test.go
diff options
context:
space:
mode:
authorKiran Kamineni <kiran.k.kamineni@intel.com>2019-05-22 23:48:26 -0700
committerKiran Kamineni <kiran.k.kamineni@intel.com>2019-05-22 23:53:27 -0700
commit525023e1d288bbf9cf59584c5b5dd37d83be7a4b (patch)
treebebc995e431abe5fc6b6421fdcb80b6dce8c0ce0 /src/k8splugin/api/instancehandler_test.go
parent352080a39d582a767d5908ab3372ac10d59a2261 (diff)
Minor change to instance response
Minor change to instance response. Now it includes the full request parameters in the response. Issue-ID: MULTICLOUD-649 Change-Id: Ia4a7e479f842dd580bcfb13aa91dc0b0a456cf25 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
Diffstat (limited to 'src/k8splugin/api/instancehandler_test.go')
-rw-r--r--src/k8splugin/api/instancehandler_test.go40
1 files changed, 24 insertions, 16 deletions
diff --git a/src/k8splugin/api/instancehandler_test.go b/src/k8splugin/api/instancehandler_test.go
index 6d2abf6f..2e2450ed 100644
--- a/src/k8splugin/api/instancehandler_test.go
+++ b/src/k8splugin/api/instancehandler_test.go
@@ -105,10 +105,12 @@ func TestInstanceCreateHandler(t *testing.T) {
}`)),
expected: app.InstanceResponse{
ID: "HaKpys8e",
- RBName: "test-rbdef",
- RBVersion: "v1",
- ProfileName: "profile1",
- CloudRegion: "region1",
+ Request: app.InstanceRequest{
+ RBName: "test-rbdef",
+ RBVersion: "v1",
+ ProfileName: "profile1",
+ CloudRegion: "region1",
+ },
Namespace: "testnamespace",
Resources: []helm.KubernetesResource{
{
@@ -132,10 +134,12 @@ func TestInstanceCreateHandler(t *testing.T) {
items: []app.InstanceResponse{
{
ID: "HaKpys8e",
- RBName: "test-rbdef",
- RBVersion: "v1",
- ProfileName: "profile1",
- CloudRegion: "region1",
+ Request: app.InstanceRequest{
+ RBName: "test-rbdef",
+ RBVersion: "v1",
+ ProfileName: "profile1",
+ CloudRegion: "region1",
+ },
Namespace: "testnamespace",
Resources: []helm.KubernetesResource{
{
@@ -204,10 +208,12 @@ func TestInstanceGetHandler(t *testing.T) {
expectedCode: http.StatusOK,
expectedResponse: &app.InstanceResponse{
ID: "HaKpys8e",
- RBName: "test-rbdef",
- RBVersion: "v1",
- ProfileName: "profile1",
- CloudRegion: "region1",
+ Request: app.InstanceRequest{
+ RBName: "test-rbdef",
+ RBVersion: "v1",
+ ProfileName: "profile1",
+ CloudRegion: "region1",
+ },
Namespace: "testnamespace",
Resources: []helm.KubernetesResource{
{
@@ -230,10 +236,12 @@ func TestInstanceGetHandler(t *testing.T) {
items: []app.InstanceResponse{
{
ID: "HaKpys8e",
- RBName: "test-rbdef",
- RBVersion: "v1",
- ProfileName: "profile1",
- CloudRegion: "region1",
+ Request: app.InstanceRequest{
+ RBName: "test-rbdef",
+ RBVersion: "v1",
+ ProfileName: "profile1",
+ CloudRegion: "region1",
+ },
Namespace: "testnamespace",
Resources: []helm.KubernetesResource{
{