Documentation ¶
Index ¶
Constants ¶
const CreateRequest = `` /* 198-byte string literal not displayed */
CreateRequest provides the input to a Create request.
const GetOutput = `` /* 365-byte string literal not displayed */
GetOutput provides a Get result.
const ListOutput = `` /* 800-byte string literal not displayed */
ListOutput provides a single page of Region results.
const UpdateOutput = `` /* 344-byte string literal not displayed */
// Due to a bug in Keystone, the Extra column of the Region table // is not updatable, see: https://bugs.launchpad.net/keystone/+bug/1729933 // This following line should replace the email in UpdateOutput.extra once // the fix is merged. "email": "1stwestsupport@example.com"
UpdateOutput provides an update result.
const UpdateRequest = `
{
"region": {
"description": "First West sub-region of RegionOne"
}
}
`
// Due to a bug in Keystone, the Extra column of the Region table // is not updatable, see: https://bugs.launchpad.net/keystone/+bug/1729933 // The following line should be added to region in UpdateRequest once the // fix is merged. "email": "1stwestsupport@example.com"
UpdateRequest provides the input to as Update request.
Variables ¶
var ExpectedRegionsSlice = []regions.Region{FirstRegion, SecondRegion}
ExpectedRegionsSlice is the slice of regions expected to be returned from ListOutput.
var FirstRegion = regions.Region{ ID: "RegionOne-East", Links: map[string]interface{}{ "self": "http://example.com/identity/v3/regions/RegionOne-East", }, Description: "East sub-region of RegionOne", Extra: map[string]interface{}{}, ParentRegionID: "RegionOne", }
FirstRegion is the first region in the List request.
var SecondRegion = regions.Region{ ID: "RegionOne-West", Links: map[string]interface{}{ "self": "https://example.com/identity/v3/regions/RegionOne-West", }, Description: "West sub-region of RegionOne", Extra: map[string]interface{}{ "email": "westsupport@example.com", }, ParentRegionID: "RegionOne", }
SecondRegion is the second region in the List request.
var SecondRegionUpdated = regions.Region{ ID: "RegionOne-West", Links: map[string]interface{}{ "self": "https://example.com/identity/v3/regions/RegionOne-West", }, Description: "First West sub-region of RegionOne", Extra: map[string]interface{}{ "email": "westsupport@example.com", }, ParentRegionID: "RegionOne", }
// Due to a bug in Keystone, the Extra column of the Region table // is not updatable, see: https://bugs.launchpad.net/keystone/+bug/1729933 // This should replace the email in SecondRegionUpdated.Extra once the fix // is merged. "email": "1stwestsupport@example.com"
SecondRegionUpdated is the second region in the List request.
Functions ¶
func HandleCreateRegionSuccessfully ¶
HandleCreateRegionSuccessfully creates an HTTP handler at `/regions` on the test handler mux that tests region creation.
func HandleDeleteRegionSuccessfully ¶
HandleDeleteRegionSuccessfully creates an HTTP handler at `/regions` on the test handler mux that tests region deletion.
func HandleGetRegionSuccessfully ¶
HandleGetRegionSuccessfully creates an HTTP handler at `/regions` on the test handler mux that responds with a single region.
func HandleListRegionsSuccessfully ¶
HandleListRegionsSuccessfully creates an HTTP handler at `/regions` on the test handler mux that responds with a list of two regions.
func HandleUpdateRegionSuccessfully ¶
HandleUpdateRegionSuccessfully creates an HTTP handler at `/regions` on the test handler mux that tests region update.
Types ¶
This section is empty.