Documentation ¶
Overview ¶
zones unit tests
Index ¶
Constants ¶
const CreateZoneRequest = `` /* 151-byte string literal not displayed */
CreateZoneRequest is a sample request to create a zone.
const CreateZoneResponse = `` /* 632-byte string literal not displayed */
CreateZoneResponse is a sample response to a create request.
const DeleteZoneResponse = `` /* 627-byte string literal not displayed */
DeleteZoneResponse is a sample response to update a zone.
const GetOutput = `` /* 632-byte string literal not displayed */
GetOutput is a sample response to a Get call.
const ListOutput = `` /* 1795-byte string literal not displayed */
List Output is a sample response to a List call.
const UpdateZoneRequest = `
{
"ttl": 600,
"description": "Updated Description"
}
`
UpdateZoneRequest is a sample request to update a zone.
const UpdateZoneResponse = `` /* 627-byte string literal not displayed */
UpdateZoneResponse is a sample response to update a zone.
Variables ¶
var CreatedZone = FirstZone
CreatedZone is the expected created zone
var ExpectedZonesSlice = []zones.Zone{FirstZone, SecondZone}
ExpectedZonesSlice is the slice of results that should be parsed from ListOutput, in the expected order.
var FirstZone = zones.Zone{ ID: "a86dba58-0043-4cc6-a1bb-69d5e86f3ca3", PoolID: "572ba08c-d929-4c70-8e42-03824bb24ca2", ProjectID: "4335d1f0-f793-11e2-b778-0800200c9a66", Name: "example.org.", Email: "joe@example.org", TTL: 7200, Serial: 1404757531, Status: "ACTIVE", Action: "CREATE", Description: "This is an example zone.", Masters: []string{}, Type: "PRIMARY", Version: 1, CreatedAt: FirstZoneCreatedAt, Links: map[string]interface{}{ "self": "https://127.0.0.1:9001/v2/zones/a86dba58-0043-4cc6-a1bb-69d5e86f3ca3", }, }
var FirstZoneCreatedAt, _ = time.Parse(gophercloud.RFC3339MilliNoZ, "2014-07-07T18:25:31.275934")
FirstZone is the first result in ListOutput
var SecondZone = zones.Zone{ ID: "34c4561c-9205-4386-9df5-167436f5a222", PoolID: "572ba08c-d929-4c70-8e42-03824bb24ca2", ProjectID: "4335d1f0-f793-11e2-b778-0800200c9a66", Name: "foo.example.com.", Email: "joe@foo.example.com", TTL: 7200, Serial: 1488053571, Status: "ACTIVE", Action: "CREATE", Description: "This is another example zone.", Masters: []string{"example.com."}, Type: "PRIMARY", Version: 1, CreatedAt: SecondZoneCreatedAt, UpdatedAt: SecondZoneUpdatedAt, Links: map[string]interface{}{ "self": "https://127.0.0.1:9001/v2/zones/34c4561c-9205-4386-9df5-167436f5a222", }, }
var SecondZoneCreatedAt, _ = time.Parse(gophercloud.RFC3339MilliNoZ, "2014-07-07T18:25:31.275934")
var SecondZoneUpdatedAt, _ = time.Parse(gophercloud.RFC3339MilliNoZ, "2015-02-25T20:23:01.234567")
Functions ¶
func HandleCreateSuccessfully ¶
HandleZoneCreationSuccessfully configures the test server to respond to a Create request.
func HandleDeleteSuccessfully ¶
HandleZoneDeleteSuccessfully configures the test server to respond to an Delete request.
func HandleGetSuccessfully ¶
HandleGetSuccessfully configures the test server to respond to a List request.
func HandleListSuccessfully ¶
HandleListSuccessfully configures the test server to respond to a List request.
func HandleUpdateSuccessfully ¶
HandleZoneUpdateSuccessfully configures the test server to respond to an Update request.
Types ¶
This section is empty.