Ensure StorageURL ends in a slash (#183)
* Ensure StorageURL ends in a slash
* Use NormalizeURL instead of HasSuffix
* Go back to a one-line import
diff --git a/openstack/objectstorage/v1/swauth/requests.go b/openstack/objectstorage/v1/swauth/requests.go
index ce4bf9a..e8589ae 100644
--- a/openstack/objectstorage/v1/swauth/requests.go
+++ b/openstack/objectstorage/v1/swauth/requests.go
@@ -61,7 +61,7 @@
swiftClient := &gophercloud.ServiceClient{
ProviderClient: pc,
- Endpoint: auth.StorageURL,
+ Endpoint: gophercloud.NormalizeURL(auth.StorageURL),
}
swiftClient.TokenID = auth.Token
diff --git a/openstack/objectstorage/v1/swauth/testing/fixtures.go b/openstack/objectstorage/v1/swauth/testing/fixtures.go
index f7cbc93..79858f5 100644
--- a/openstack/objectstorage/v1/swauth/testing/fixtures.go
+++ b/openstack/objectstorage/v1/swauth/testing/fixtures.go
@@ -12,7 +12,7 @@
// AuthResult is the expected result of AuthOutput
var AuthResult = swauth.AuthResult{
Token: "AUTH_tk6223e6071f8f4299aa334b48015484a1",
- StorageURL: "http://127.0.0.1:8080/v1/AUTH_test",
+ StorageURL: "http://127.0.0.1:8080/v1/AUTH_test/",
}
// HandleAuthSuccessfully configures the test server to respond to an Auth request.