summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/k8splugin/api')
-rw-r--r--src/k8splugin/api/brokerhandler_test.go20
-rw-r--r--src/k8splugin/api/instancehandler_test.go40
2 files changed, 36 insertions, 24 deletions
diff --git a/src/k8splugin/api/brokerhandler_test.go b/src/k8splugin/api/brokerhandler_test.go
index e7ff08c4..82894412 100644
--- a/src/k8splugin/api/brokerhandler_test.go
+++ b/src/k8splugin/api/brokerhandler_test.go
@@ -112,10 +112,12 @@ func TestBrokerCreateHandler(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{
{
@@ -195,10 +197,12 @@ func TestBrokerGetHandler(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{
{
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{
{