Add acceptance test for reset API key.
diff --git a/acceptance/rackspace/identity/v2/user_test.go b/acceptance/rackspace/identity/v2/user_test.go
index d3234e8..28c0c83 100644
--- a/acceptance/rackspace/identity/v2/user_test.go
+++ b/acceptance/rackspace/identity/v2/user_test.go
@@ -25,6 +25,8 @@
updateUser(t, client, userID)
+ resetApiKey(t, client, userID)
+
deleteUser(t, client, userID)
}
@@ -78,3 +80,14 @@
th.AssertNoErr(t, res.Err)
t.Logf("Deleted user %s", userID)
}
+
+func resetApiKey(t *testing.T, client *gophercloud.ServiceClient, userID string) {
+ key, err := users.ResetAPIKey(client, userID).Extract()
+ th.AssertNoErr(t, err)
+
+ if key.APIKey == "" {
+ t.Fatal("failed to reset API key for user")
+ }
+
+ t.Logf("Reset API key for user %s to %s", key.Username, key.APIKey)
+}