Acceptance Test Updates (#218)
* compute: don't pass choices
* blockstorage: don't pass choices
* DumpResource Function
This function prints a resource in JSON format but retains the actual
field name rather than using the name specified in the JSON tag.
* New DumpResource
This version just converts the resource into JSON. The original is
being left in git history for posterity.
* Renaming DumpResource to PrintResource
* Removing all print functions in favor of PrintResource
* Rebase reconcilliation
diff --git a/acceptance/openstack/identity/v2/token_test.go b/acceptance/openstack/identity/v2/token_test.go
index 4cd8301..82a317a 100644
--- a/acceptance/openstack/identity/v2/token_test.go
+++ b/acceptance/openstack/identity/v2/token_test.go
@@ -6,6 +6,7 @@
"testing"
"github.com/gophercloud/gophercloud/acceptance/clients"
+ "github.com/gophercloud/gophercloud/acceptance/tools"
"github.com/gophercloud/gophercloud/openstack"
"github.com/gophercloud/gophercloud/openstack/identity/v2/tokens"
)
@@ -27,7 +28,7 @@
t.Fatalf("Unable to extract token: %v", err)
}
- PrintToken(t, token)
+ tools.PrintResource(t, token)
catalog, err := result.ExtractServiceCatalog()
if err != nil {
@@ -35,7 +36,7 @@
}
for _, entry := range catalog.Entries {
- PrintCatalogEntry(t, &entry)
+ tools.PrintResource(t, entry)
}
}
@@ -56,7 +57,7 @@
t.Fatalf("Unable to extract token: %v", err)
}
- PrintToken(t, token)
+ tools.PrintResource(t, token)
getResult := tokens.Get(client, token.ID)
user, err := getResult.ExtractUser()
@@ -64,5 +65,5 @@
t.Fatalf("Unable to extract user: %v", err)
}
- PrintTokenUser(t, user)
+ tools.PrintResource(t, user)
}