Documentation ¶
Index ¶
Constants ¶
const CreateRequest = `` /* 173-byte string literal not displayed */
CreateRequest provides the input to a Create request.
const GetOutput = `` /* 328-byte string literal not displayed */
GetOutput provides a Get result.
const ListOutput = `` /* 946-byte string literal not displayed */
ListOutput provides a single page of Group results.
const UpdateOutput = `` /* 324-byte string literal not displayed */
UpdateOutput provides an update result.
const UpdateRequest = `
{
"group": {
"description": "L2 Support Team",
"email": "supportteam@example.com"
}
}
`
UpdateRequest provides the input to as Update request.
Variables ¶
var ExpectedGroupsSlice = []groups.Group{FirstGroup, SecondGroup}
ExpectedGroupsSlice is the slice of groups expected to be returned from ListOutput.
var FirstGroup = groups.Group{ DomainID: "default", ID: "2844b2a08be147a08ef58317d6471f1f", Links: map[string]interface{}{ "self": "http://example.com/identity/v3/groups/2844b2a08be147a08ef58317d6471f1f", }, Name: "internal support", Description: "group for internal support users", Extra: map[string]interface{}{ "email": "support@localhost", }, }
FirstGroup is the first group in the List request.
var SecondGroup = groups.Group{ DomainID: "1789d1", ID: "9fe1d3", Links: map[string]interface{}{ "self": "https://example.com/identity/v3/groups/9fe1d3", }, Name: "support", Description: "group for support users", Extra: map[string]interface{}{ "email": "support@example.com", }, }
SecondGroup is the second group in the List request.
var SecondGroupUpdated = groups.Group{ DomainID: "1789d1", ID: "9fe1d3", Links: map[string]interface{}{ "self": "https://example.com/identity/v3/groups/9fe1d3", }, Name: "support", Description: "L2 Support Team", Extra: map[string]interface{}{ "email": "supportteam@example.com", }, }
SecondGroupUpdated is how SecondGroup should look after an Update.
Functions ¶
func HandleCreateGroupSuccessfully ¶
HandleCreateGroupSuccessfully creates an HTTP handler at `/groups` on the test handler mux that tests group creation.
func HandleDeleteGroupSuccessfully ¶
HandleDeleteGroupSuccessfully creates an HTTP handler at `/groups` on the test handler mux that tests group deletion.
func HandleGetGroupSuccessfully ¶
HandleGetGroupSuccessfully creates an HTTP handler at `/groups` on the test handler mux that responds with a single group.
func HandleListGroupsSuccessfully ¶
HandleListGroupsSuccessfully creates an HTTP handler at `/groups` on the test handler mux that responds with a list of two groups.
func HandleUpdateGroupSuccessfully ¶
HandleUpdateGroupSuccessfully creates an HTTP handler at `/groups` on the test handler mux that tests group update.
Types ¶
This section is empty.