Explicitly auth against v3 in v3 tests.
Skip v3 tests altogether if no USERID is set.
diff --git a/acceptance/openstack/identity/v3/token_test.go b/acceptance/openstack/identity/v3/token_test.go
index eb65cea..d5f9ea6 100644
--- a/acceptance/openstack/identity/v3/token_test.go
+++ b/acceptance/openstack/identity/v3/token_test.go
@@ -17,8 +17,12 @@
t.Fatalf("Unable to acquire credentials: %v", err)
}
- // Trim out unused fields.
+ // Trim out unused fields. Skip if we don't have a UserID.
ao.Username, ao.TenantID, ao.TenantName = "", "", ""
+ if ao.UserID == "" {
+ t.Logf("Skipping identity v3 tests because no OS_USERID is present.")
+ return
+ }
// Create an unauthenticated client.
provider, err := openstack.NewClient(ao.IdentityEndpoint)