fixes to get acceptance tests passing
diff --git a/acceptance/openstack/objectstorage/v1/accounts_test.go b/acceptance/openstack/objectstorage/v1/accounts_test.go
index 6768927..b55f2a6 100644
--- a/acceptance/openstack/objectstorage/v1/accounts_test.go
+++ b/acceptance/openstack/objectstorage/v1/accounts_test.go
@@ -7,46 +7,32 @@
"testing"
"github.com/rackspace/gophercloud/openstack/objectstorage/v1/accounts"
+ th "github.com/rackspace/gophercloud/testhelper"
)
func TestAccounts(t *testing.T) {
// Create a provider client for making the HTTP requests.
// See common.go in this directory for more information.
client, err := newClient()
- if err != nil {
- t.Error(err)
- return
- }
+ th.AssertNoErr(t, err)
// Update an account's metadata.
- err = accounts.Update(client, accounts.UpdateOpts{
- Metadata: metadata,
- })
- if err != nil {
- t.Error(err)
- return
- }
+ res = accounts.Update(client, accounts.UpdateOpts{Metadata: metadata})
+ th.AssertNoErr(t, res.Err)
+
// Defer the deletion of the metadata set above.
defer func() {
tempMap := make(map[string]string)
for k := range metadata {
tempMap[k] = ""
}
- err = accounts.Update(client, accounts.UpdateOpts{
- Metadata: tempMap,
- })
- if err != nil {
- t.Error(err)
- return
- }
+ res = accounts.Update(client, accounts.UpdateOpts{Metadata: tempMap})
+ th.AssertNoErr(t, res.Err)
}()
// Retrieve account metadata.
- gr, err := accounts.Get(client, accounts.GetOpts{})
- if err != nil {
- t.Error(err)
- return
- }
+ res := accounts.Get(client, accounts.GetOpts{})
+ th.AssertNoErr(res.Err)
// Extract the custom metadata from the 'Get' response.
am := accounts.ExtractMetadata(gr)
for k := range metadata {