Documentation ¶
Index ¶
- Constants
- Variables
- func HandleCreateDomainSuccessfully(t *testing.T)
- func HandleDeleteDomainSuccessfully(t *testing.T)
- func HandleGetDomainSuccessfully(t *testing.T)
- func HandleListAvailableDomainsSuccessfully(t *testing.T)
- func HandleListDomainsSuccessfully(t *testing.T)
- func HandleUpdateDomainSuccessfully(t *testing.T)
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 ListAvailableOutput = `` /* 775-byte string literal not displayed */
ListAvailableOutput provides a single page of available domain results.
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 ExpectedAvailableDomainsSlice = []domains.Domain{TestDomain, ProdDomain}
ExpectedAvailableDomainsSlice is the slice of domains expected to be returned from ListAvailableOutput.
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 ProdDomain = domains.Domain{ Enabled: true, ID: "a720688fb87f4575a4c000d818061eae", Links: map[string]interface{}{ "self": "https://example.com/v3/domains/a720688fb87f4575a4c000d818061eae", }, Name: "ProdDomain", Description: "Production domain", }
ProdDomain is a domain fixture.
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.
var TestDomain = domains.Domain{ Enabled: false, ID: "52af04aec5f84182b06959d2775d2000", Links: map[string]interface{}{ "self": "https://example.com/v3/domains/52af04aec5f84182b06959d2775d2000", }, Name: "TestDomain", Description: "Testing domain", }
TestDomain is a domain fixture.
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 HandleListAvailableDomainsSuccessfully ¶
HandleListAvailableDomainsSuccessfully creates an HTTP handler at `/auth/domains` on the test handler mux that responds with a list of two domains.
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.