Exercise the endpoint discovery code a little.
diff --git a/acceptance/openstack/client_test.go b/acceptance/openstack/client_test.go
index 578469d..053e2ac 100644
--- a/acceptance/openstack/client_test.go
+++ b/acceptance/openstack/client_test.go
@@ -3,6 +3,7 @@
package openstack
import (
+ "os"
"testing"
"github.com/rackspace/gophercloud/openstack"
@@ -17,7 +18,7 @@
}
// Trim out unused fields.
- ao.TenantID, ao.TenantName = "", ""
+ ao.TenantID, ao.TenantName, ao.Username = "", "", ""
client, err := openstack.AuthenticatedClient(ao)
if err != nil {
@@ -29,4 +30,12 @@
}
t.Logf("Client successfully acquired a token: %v", client.TokenID)
+
+ // Find the storage service in the service catalog.
+ storage, err := openstack.NewStorageV1(client, os.Getenv("OS_REGION_NAME"))
+ if err != nil {
+ t.Errorf("Unable to locate a storage service: %v", err)
+ } else {
+ t.Logf("Located a storage service at endpoint: [%s]", storage.Endpoint)
+ }
}