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/compute/v2/flavors_test.go b/acceptance/openstack/compute/v2/flavors_test.go
index 6f6490e..ee698cc 100644
--- a/acceptance/openstack/compute/v2/flavors_test.go
+++ b/acceptance/openstack/compute/v2/flavors_test.go
@@ -6,6 +6,7 @@
"testing"
"github.com/gophercloud/gophercloud/acceptance/clients"
+ "github.com/gophercloud/gophercloud/acceptance/tools"
"github.com/gophercloud/gophercloud/openstack/compute/v2/flavors"
)
@@ -26,7 +27,7 @@
}
for _, flavor := range allFlavors {
- PrintFlavor(t, &flavor)
+ tools.PrintResource(t, flavor)
}
}
@@ -36,7 +37,7 @@
t.Fatalf("Unable to create a compute client: %v", err)
}
- choices, err :=clients.AcceptanceTestChoicesFromEnv()
+ choices, err := clients.AcceptanceTestChoicesFromEnv()
if err != nil {
t.Fatal(err)
}
@@ -46,5 +47,5 @@
t.Fatalf("Unable to get flavor information: %v", err)
}
- PrintFlavor(t, flavor)
+ tools.PrintResource(t, flavor)
}