Documentation ¶
Index ¶
- Constants
- Variables
- func HandleCreateNoOptionsUserSuccessfully(t *testing.T)
- func HandleCreateUserSuccessfully(t *testing.T)
- func HandleDeleteUserSuccessfully(t *testing.T)
- func HandleGetUserSuccessfully(t *testing.T)
- func HandleListInGroupSuccessfully(t *testing.T)
- func HandleListUserGroupsSuccessfully(t *testing.T)
- func HandleListUserProjectsSuccessfully(t *testing.T)
- func HandleListUsersSuccessfully(t *testing.T)
- func HandleUpdateUserSuccessfully(t *testing.T)
Constants ¶
const CreateNoOptionsRequest = `` /* 221-byte string literal not displayed */
CreateNoOptionsRequest provides the input to a Create request with no Options.
const CreateRequest = `` /* 395-byte string literal not displayed */
CreateRequest provides the input to a Create request.
const GetOutput = `` /* 541-byte string literal not displayed */
GetOutput provides a Get result.
const GetOutputNoOptions = `` /* 367-byte string literal not displayed */
GetOutputNoOptions provides a Get result of a user with no options.
const ListGroupsOutput = `` /* 822-byte string literal not displayed */
ListGroupsOutput provides a ListGroups result.
const ListOutput = `` /* 1214-byte string literal not displayed */
ListOutput provides a single page of User results.
const ListProjectsOutput = `` /* 847-byte string literal not displayed */
ListProjectsOutput provides a ListProjects result.
const UpdateOutput = `` /* 478-byte string literal not displayed */
UpdateOutput provides an update result.
const UpdateRequest = `` /* 161-byte string literal not displayed */
UpdateRequest provides the input to as Update request.
Variables ¶
var ExpectedGroupsSlice = []groups.Group{FirstGroup, SecondGroup}
var ExpectedProjectsSlice = []projects.Project{FirstProject, SecondProject}
var ExpectedUsersSlice = []users.User{FirstUser, SecondUser}
ExpectedUsersSlice is the slice of users expected to be returned from ListOutput.
var FirstGroup = groups.Group{ Description: "Developers cleared for work on all general projects", DomainID: "1789d1", ID: "ea167b", Links: map[string]interface{}{ "self": "https://example.com/identity/v3/groups/ea167b", }, Extra: map[string]interface{}{ "building": "Hilltop A", }, Name: "Developers", }
var FirstProject = projects.Project{ Description: "my first project", DomainID: "11111", Enabled: true, ID: "abcde", Name: "project 1", ParentID: "11111", }
var FirstUser = users.User{ DomainID: "default", Enabled: true, ID: "2844b2a08be147a08ef58317d6471f1f", Links: map[string]interface{}{ "self": "http://example.com/identity/v3/users/2844b2a08be147a08ef58317d6471f1f", }, Name: "glance", PasswordExpiresAt: nilTime, Description: "some description", Extra: map[string]interface{}{ "email": "glance@localhost", }, }
var SecondGroup = groups.Group{ Description: "Developers cleared for work on secret projects", DomainID: "1789d1", ID: "a62db1", Links: map[string]interface{}{ "self": "https://example.com/identity/v3/groups/a62db1", }, Extra: map[string]interface{}{}, Name: "Secure Developers", }
var SecondProject = projects.Project{ Description: "my second project", DomainID: "22222", Enabled: true, ID: "bcdef", Name: "project 2", ParentID: "22222", }
var SecondUser = users.User{ DefaultProjectID: "263fd9", DomainID: "1789d1", Enabled: true, ID: "9fe1d3", Links: map[string]interface{}{ "self": "https://example.com/identity/v3/users/9fe1d3", }, Name: "jsmith", PasswordExpiresAt: SecondUserPasswordExpiresAt, Extra: map[string]interface{}{ "email": "jsmith@example.com", }, Options: map[string]interface{}{ "ignore_password_expiry": true, "multi_factor_auth_rules": []interface{}{ []string{"password", "totp"}, []string{"password", "custom-auth-method"}, }, }, }
var SecondUserNoOptions = users.User{ DefaultProjectID: "263fd9", DomainID: "1789d1", Enabled: true, ID: "9fe1d3", Links: map[string]interface{}{ "self": "https://example.com/identity/v3/users/9fe1d3", }, Name: "jsmith", PasswordExpiresAt: SecondUserPasswordExpiresAt, Extra: map[string]interface{}{ "email": "jsmith@example.com", }, }
var SecondUserPasswordExpiresAt, _ = time.Parse(gophercloud.RFC3339MilliNoZ, "2016-11-06T15:32:17.000000")
SecondUser is the second user in the List request.
var SecondUserUpdated = users.User{ DefaultProjectID: "263fd9", DomainID: "1789d1", Enabled: false, ID: "9fe1d3", Links: map[string]interface{}{ "self": "https://example.com/identity/v3/users/9fe1d3", }, Name: "jsmith", PasswordExpiresAt: SecondUserPasswordExpiresAt, Extra: map[string]interface{}{ "email": "jsmith@example.com", "disabled_reason": "DDOS", }, Options: map[string]interface{}{ "ignore_password_expiry": true, }, }
SecondUserUpdated is how SecondUser should look after an Update.
Functions ¶
func HandleCreateNoOptionsUserSuccessfully ¶
HandleCreateNoOptionsUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that tests user creation.
func HandleCreateUserSuccessfully ¶
HandleCreateUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that tests user creation.
func HandleDeleteUserSuccessfully ¶
HandleDeleteUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that tests user deletion.
func HandleGetUserSuccessfully ¶
HandleGetUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that responds with a single user.
func HandleListInGroupSuccessfully ¶
HandleListInGroupSuccessfully creates an HTTP handler at /groups/{groupID}/users on the test handler mux that response with a list of two users
func HandleListUserGroupsSuccessfully ¶
HandleListUserGroupsSuccessfully creates an HTTP handler at /users/{userID}/groups on the test handler mux that respons with a list of two groups
func HandleListUserProjectsSuccessfully ¶
HandleListUserProjectsSuccessfully creates an HTTP handler at /users/{userID}/projects on the test handler mux that respons wit a list of two projects
func HandleListUsersSuccessfully ¶
HandleListUsersSuccessfully creates an HTTP handler at `/users` on the test handler mux that responds with a list of two users.
func HandleUpdateUserSuccessfully ¶
HandleUpdateUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that tests user update.
Types ¶
This section is empty.