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/v3/projects_test.go b/acceptance/openstack/identity/v3/projects_test.go
index ebb5543..8325bee 100644
--- a/acceptance/openstack/identity/v3/projects_test.go
+++ b/acceptance/openstack/identity/v3/projects_test.go
@@ -6,6 +6,7 @@
"testing"
"github.com/gophercloud/gophercloud/acceptance/clients"
+ "github.com/gophercloud/gophercloud/acceptance/tools"
"github.com/gophercloud/gophercloud/openstack/identity/v3/projects"
)
@@ -31,7 +32,7 @@
}
for _, project := range allProjects {
- PrintProject(t, &project)
+ tools.PrintResource(t, project)
}
}
@@ -57,7 +58,7 @@
t.Fatalf("Unable to get project: %v", err)
}
- PrintProject(t, p)
+ tools.PrintResource(t, p)
}
func TestProjectsCRUD(t *testing.T) {
@@ -72,7 +73,7 @@
}
defer DeleteProject(t, client, project.ID)
- PrintProject(t, project)
+ tools.PrintResource(t, project)
var iFalse bool = false
updateOpts := projects.UpdateOpts{
@@ -84,7 +85,7 @@
t.Fatalf("Unable to update project: %v", err)
}
- PrintProject(t, updatedProject)
+ tools.PrintResource(t, updatedProject)
}
func TestProjectsDomain(t *testing.T) {
@@ -104,7 +105,7 @@
}
defer DeleteProject(t, client, projectDomain.ID)
- PrintProject(t, projectDomain)
+ tools.PrintResource(t, projectDomain)
createOpts = projects.CreateOpts{
DomainID: projectDomain.ID,
@@ -116,7 +117,7 @@
}
defer DeleteProject(t, client, project.ID)
- PrintProject(t, project)
+ tools.PrintResource(t, project)
var iFalse = false
updateOpts := projects.UpdateOpts{
@@ -141,7 +142,7 @@
}
defer DeleteProject(t, client, projectMain.ID)
- PrintProject(t, projectMain)
+ tools.PrintResource(t, projectMain)
createOpts := projects.CreateOpts{
ParentID: projectMain.ID,
@@ -153,5 +154,5 @@
}
defer DeleteProject(t, client, project.ID)
- PrintProject(t, project)
+ tools.PrintResource(t, project)
}