Broken newClient method.
diff --git a/acceptance/openstack/objectstorage/v1/accounts_test.go b/acceptance/openstack/objectstorage/v1/accounts_test.go
index b55f2a6..0cbee04 100644
--- a/acceptance/openstack/objectstorage/v1/accounts_test.go
+++ b/acceptance/openstack/objectstorage/v1/accounts_test.go
@@ -13,8 +13,7 @@
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()
- th.AssertNoErr(t, err)
+ client := newClient(t)
// Update an account's metadata.
res = accounts.Update(client, accounts.UpdateOpts{Metadata: metadata})
diff --git a/acceptance/openstack/objectstorage/v1/common.go b/acceptance/openstack/objectstorage/v1/common.go
index fd1deda..a91f9c7 100644
--- a/acceptance/openstack/objectstorage/v1/common.go
+++ b/acceptance/openstack/objectstorage/v1/common.go
@@ -4,6 +4,7 @@
import (
"os"
+ "testing"
"github.com/rackspace/gophercloud"
"github.com/rackspace/gophercloud/openstack"
@@ -12,7 +13,7 @@
var metadata = map[string]string{"gopher": "cloud"}
-func newClient() (*gophercloud.ServiceClient, error) {
+func newClient(t *testing.T) *gophercloud.ServiceClient {
ao, err := openstack.AuthOptionsFromEnv()
th.AssertNoErr(t, err)
@@ -21,5 +22,5 @@
return openstack.NewObjectStorageV1(client, gophercloud.EndpointOpts{
Region: os.Getenv("OS_REGION_NAME"),
- }), nil
+ })
}
diff --git a/acceptance/openstack/objectstorage/v1/containers_test.go b/acceptance/openstack/objectstorage/v1/containers_test.go
index b2c91c5..8856941 100644
--- a/acceptance/openstack/objectstorage/v1/containers_test.go
+++ b/acceptance/openstack/objectstorage/v1/containers_test.go
@@ -17,8 +17,7 @@
func TestContainers(t *testing.T) {
// Create a new client to execute the HTTP requests. See common.go for newClient body.
- client, err := newClient()
- th.AssertNoErr(err)
+ client := newClient(t)
// Create a slice of random container names.
cNames := make([]string, numContainers)
diff --git a/acceptance/openstack/objectstorage/v1/objects_test.go b/acceptance/openstack/objectstorage/v1/objects_test.go
index 1454063..4c47367 100644
--- a/acceptance/openstack/objectstorage/v1/objects_test.go
+++ b/acceptance/openstack/objectstorage/v1/objects_test.go
@@ -20,8 +20,7 @@
func TestObjects(t *testing.T) {
// Create a provider client for executing the HTTP request.
// See common.go for more information.
- client, err := newClient()
- th.AssertNoErr(err)
+ client := newClient()
// Make a slice of length numObjects to hold the random object names.
oNames := make([]string, numObjects)