Backpedal in the acceptance tests.
diff --git a/acceptance/rackspace/identity/v2/identity_test.go b/acceptance/rackspace/identity/v2/identity_test.go
index 019a9e6..576e40f 100644
--- a/acceptance/rackspace/identity/v2/identity_test.go
+++ b/acceptance/rackspace/identity/v2/identity_test.go
@@ -3,7 +3,6 @@
package v2
import (
- "os"
"testing"
"github.com/rackspace/gophercloud"
@@ -13,16 +12,15 @@
func rackspaceAuthOptions(t *testing.T) gophercloud.AuthOptions {
// Obtain credentials from the environment.
- options := gophercloud.AuthOptions{
- Username: os.Getenv("RS_USERNAME"),
- APIKey: os.Getenv("RS_APIKEY"),
- }
+ options, err := rackspace.AuthOptionsFromEnv()
+ th.AssertNoErr(t, err)
+ options = tools.OnlyRS(options)
if options.Username == "" {
t.Fatal("Please provide a Rackspace username as RS_USERNAME.")
}
if options.APIKey == "" {
- t.Fatal("Please provide a Rackspace API key as RS_APIKEY.")
+ t.Fatal("Please provide a Rackspace API key as RS_API_KEY.")
}
return options