accounts acceptance test docs
diff --git a/acceptance/openstack/storage/v1/accounts_test.go b/acceptance/openstack/storage/v1/accounts_test.go
index f4052e0..64cd165 100644
--- a/acceptance/openstack/storage/v1/accounts_test.go
+++ b/acceptance/openstack/storage/v1/accounts_test.go
@@ -10,12 +10,15 @@
)
func TestAccounts(t *testing.T) {
+ // Create a provider client for making the HTTP requests.
+ // See common.go in this directory for more information.
client, err := newClient()
if err != nil {
t.Error(err)
return
}
+ // Update an account's metadata.
err = accounts.Update(client, accounts.UpdateOpts{
Metadata: metadata,
})
@@ -23,6 +26,7 @@
t.Error(err)
return
}
+ // Defer the deletion of the metadata set above.
defer func() {
tempMap := make(map[string]string)
for k := range metadata {
@@ -37,11 +41,13 @@
}
}()
+ // Retrieve account metadata.
gr, err := accounts.Get(client, accounts.GetOpts{})
if err != nil {
t.Error(err)
return
}
+ // Extract the custom metadata from the 'Get' response.
am := accounts.ExtractMetadata(gr)
for k := range metadata {
if am[k] != metadata[strings.Title(k)] {