Documentation ¶
Index ¶
- Constants
- Variables
- func HandleCreateNoOptionsUserSuccessfully(t *testing.T)
- func HandleCreateUserSuccessfully(t *testing.T)
- func HandleDeleteUserSuccessfully(t *testing.T)
- func HandleExtendedUpdateUserSuccessfully(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 = `` /* 182-byte string literal not displayed */
CreateNoOptionsRequest provides the input to a Create request with no Options.
const CreateRequest = `` /* 182-byte string literal not displayed */
CreateRequest provides the input to a Create request.
const GetOutput = `` /* 170-byte string literal not displayed */
GetOutput provides a Get result.
const GetOutputNoOptions = `` /* 170-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 = `` /* 505-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 UpdateExtendedOutput = `` /* 238-byte string literal not displayed */
UpdateExtendedOutput provides an update result.
const UpdateExtendedRequest = `
{
"user": {
"enabled": false,
"email": "email@generic.otc"
}
}
`
UpdateExtendedRequest provides the input to as Update request.
const UpdateOutput = `` /* 171-byte string literal not displayed */
UpdateOutput provides an update result.
const UpdateRequest = `
{
"user": {
"enabled": false
}
}
`
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", Name: "glance", }
FirstUser is the first user in the List request.
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", Name: "jsmith", }
SecondUser is the second user in the List request.
var SecondUserNoOptions = users.User{ DefaultProjectID: "263fd9", DomainID: "1789d1", Enabled: true, ID: "9fe1d3", Name: "jsmith", }
var SecondUserUpdated = users.User{ DefaultProjectID: "263fd9", DomainID: "1789d1", Enabled: false, ID: "9fe1d3", Name: "jsmith", }
SecondUserUpdated is how SecondUser should look after an Update.
var ThirdUserUpdated = users.User{ DefaultProjectID: "263fd9", DomainID: "1789d1", Enabled: false, ID: "9fe1d3", Name: "jsmith", Email: "email@generic.otc", }
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 HandleExtendedUpdateUserSuccessfully ¶ added in v0.1.0
HandleUpdateUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that tests user update.
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.