Provide expires_at in test fixtures.
diff --git a/openstack/identity/v3/tokens/requests_test.go b/openstack/identity/v3/tokens/requests_test.go
index 49b60a4..367c73c 100644
--- a/openstack/identity/v3/tokens/requests_test.go
+++ b/openstack/identity/v3/tokens/requests_test.go
@@ -29,7 +29,11 @@
testhelper.TestJSONRequest(t, r, requestJSON)
w.WriteHeader(http.StatusCreated)
- fmt.Fprintf(w, `{}`)
+ fmt.Fprintf(w, `{
+ "token": {
+ "expires_at": "2014-10-02T13:45:00.000000Z"
+ }
+ }`)
})
_, err := Create(&client, options, scope).Extract()
@@ -250,13 +254,17 @@
w.Header().Add("X-Subject-Token", "aaa111")
w.WriteHeader(http.StatusCreated)
- fmt.Fprintf(w, `{}`)
+ fmt.Fprintf(w, `{
+ "token": {
+ "expires_at": "2014-10-02T13:45:00.000000Z"
+ }
+ }`)
})
options := gophercloud.AuthOptions{UserID: "me", Password: "shhh"}
token, err := Create(&client, options, nil).Extract()
if err != nil {
- t.Errorf("Create returned an error: %v", err)
+ t.Fatalf("Create returned an error: %v", err)
}
if token.ID != "aaa111" {