move unit tests into 'testing' directories
diff --git a/openstack/objectstorage/v1/accounts/testing/doc.go b/openstack/objectstorage/v1/accounts/testing/doc.go
new file mode 100644
index 0000000..7603f83
--- /dev/null
+++ b/openstack/objectstorage/v1/accounts/testing/doc.go
@@ -0,0 +1 @@
+package testing
diff --git a/openstack/objectstorage/v1/accounts/fixtures.go b/openstack/objectstorage/v1/accounts/testing/fixtures.go
similarity index 96%
rename from openstack/objectstorage/v1/accounts/fixtures.go
rename to openstack/objectstorage/v1/accounts/testing/fixtures.go
index 16327e8..a265199 100644
--- a/openstack/objectstorage/v1/accounts/fixtures.go
+++ b/openstack/objectstorage/v1/accounts/testing/fixtures.go
@@ -1,6 +1,4 @@
-// +build fixtures
-
-package accounts
+package testing
import (
"net/http"
diff --git a/openstack/objectstorage/v1/accounts/requests_test.go b/openstack/objectstorage/v1/accounts/testing/requests_test.go
similarity index 66%
rename from openstack/objectstorage/v1/accounts/requests_test.go
rename to openstack/objectstorage/v1/accounts/testing/requests_test.go
index 8aba591..cf3fe05 100644
--- a/openstack/objectstorage/v1/accounts/requests_test.go
+++ b/openstack/objectstorage/v1/accounts/testing/requests_test.go
@@ -1,8 +1,9 @@
-package accounts
+package testing
import (
"testing"
+ "github.com/gophercloud/gophercloud/openstack/objectstorage/v1/accounts"
th "github.com/gophercloud/gophercloud/testhelper"
fake "github.com/gophercloud/gophercloud/testhelper/client"
)
@@ -12,8 +13,8 @@
defer th.TeardownHTTP()
HandleUpdateAccountSuccessfully(t)
- options := &UpdateOpts{Metadata: map[string]string{"gophercloud-test": "accounts"}}
- _, err := Update(fake.ServiceClient(), options).Extract()
+ options := &accounts.UpdateOpts{Metadata: map[string]string{"gophercloud-test": "accounts"}}
+ _, err := accounts.Update(fake.ServiceClient(), options).Extract()
th.AssertNoErr(t, err)
}
@@ -23,7 +24,7 @@
HandleGetAccountSuccessfully(t)
expectedMetadata := map[string]string{"Subject": "books"}
- res := Get(fake.ServiceClient(), &GetOpts{})
+ res := accounts.Get(fake.ServiceClient(), &accounts.GetOpts{})
th.AssertNoErr(t, res.Err)
actualMetadata, _ := res.ExtractMetadata()
th.CheckDeepEquals(t, expectedMetadata, actualMetadata)