Documentation ¶
Index ¶
Constants ¶
const CreateRequest = `
{
"domain": {
"name": "domain two"
}
}
`
CreateRequest provides the input to a Create request.
const GetOutput = `` /* 204-byte string literal not displayed */
GetOutput provides a Get result.
const ListOutput = `` /* 696-byte string literal not displayed */
ListOutput provides a single page of Domain results.
const UpdateOutput = `` /* 239-byte string literal not displayed */
UpdateOutput provides an update result.
const UpdateRequest = `
{
"domain": {
"description": "Staging Domain"
}
}
`
UpdateRequest provides the input to as Update request.
Variables ¶
var ExpectedDomainsSlice = []domains.Domain{FirstDomain, SecondDomain}
ExpectedDomainsSlice is the slice of domains expected to be returned from ListOutput.
var FirstDomain = domains.Domain{ Enabled: true, ID: "2844b2a08be147a08ef58317d6471f1f", Links: map[string]interface{}{ "self": "http://example.com/identity/v3/domains/2844b2a08be147a08ef58317d6471f1f", }, Name: "domain one", Description: "some description", }
FirstDomain is the first domain in the List request.
var SecondDomain = domains.Domain{ Enabled: true, ID: "9fe1d3", Links: map[string]interface{}{ "self": "https://example.com/identity/v3/domains/9fe1d3", }, Name: "domain two", }
SecondDomain is the second domain in the List request.
var SecondDomainUpdated = domains.Domain{ Enabled: true, ID: "9fe1d3", Links: map[string]interface{}{ "self": "https://example.com/identity/v3/domains/9fe1d3", }, Name: "domain two", Description: "Staging Domain", }
SecondDomainUpdated is how SecondDomain should look after an Update.
Functions ¶
func HandleCreateDomainSuccessfully ¶
HandleCreateDomainSuccessfully creates an HTTP handler at `/domains` on the test handler mux that tests domain creation.
func HandleDeleteDomainSuccessfully ¶
HandleDeleteDomainSuccessfully creates an HTTP handler at `/domains` on the test handler mux that tests domain deletion.
func HandleGetDomainSuccessfully ¶
HandleGetDomainSuccessfully creates an HTTP handler at `/domains` on the test handler mux that responds with a single domain.
func HandleListDomainsSuccessfully ¶
HandleListDomainsSuccessfully creates an HTTP handler at `/domains` on the test handler mux that responds with a list of two domains.
func HandleUpdateDomainSuccessfully ¶
HandleUpdateDomainSuccessfully creates an HTTP handler at `/domains` on the test handler mux that tests domain update.
Types ¶
This section is empty.