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/networking/v2/subnets_test.go b/acceptance/openstack/networking/v2/subnets_test.go
index 1d7696c..fd50a1f 100644
--- a/acceptance/openstack/networking/v2/subnets_test.go
+++ b/acceptance/openstack/networking/v2/subnets_test.go
@@ -29,7 +29,7 @@
}
for _, subnet := range allSubnets {
- PrintSubnet(t, &subnet)
+ tools.PrintResource(t, subnet)
}
}
@@ -53,7 +53,7 @@
}
defer DeleteSubnet(t, client, subnet.ID)
- PrintSubnet(t, subnet)
+ tools.PrintResource(t, subnet)
// Update Subnet
newSubnetName := tools.RandomString("TESTACC-", 8)
@@ -71,7 +71,7 @@
t.Fatalf("Unable to get subnet: %v", err)
}
- PrintSubnet(t, newSubnet)
+ tools.PrintResource(t, newSubnet)
}
func TestSubnetsDefaultGateway(t *testing.T) {
@@ -94,7 +94,7 @@
}
defer DeleteSubnet(t, client, subnet.ID)
- PrintSubnet(t, subnet)
+ tools.PrintResource(t, subnet)
if subnet.GatewayIP == "" {
t.Fatalf("A default gateway was not created.")
@@ -135,7 +135,7 @@
}
defer DeleteSubnet(t, client, subnet.ID)
- PrintSubnet(t, subnet)
+ tools.PrintResource(t, subnet)
if subnet.GatewayIP != "" {
t.Fatalf("A gateway exists when it shouldn't.")