Documentation ¶
Overview ¶
zones unit tests
Index ¶
Constants ¶
const CreateZoneRequest = `` /* 128-byte string literal not displayed */
CreateZoneRequest is a sample request to create a zone.
const CreateZoneResponse = `` /* 539-byte string literal not displayed */
CreateZoneResponse is a sample response to a create request.
const DeleteZoneResponse = `` /* 534-byte string literal not displayed */
DeleteZoneResponse is a sample response to update a zone.
const GetOutput = `` /* 539-byte string literal not displayed */
GetOutput is a sample response to a Get call.
const ListOutput = `` /* 1546-byte string literal not displayed */
ListOutput 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 = `` /* 534-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", Description: "This is an example zone.", Masters: []string{}, CreatedAt: "2014-07-07T18:25:31.275934", Links: map[string]interface{}{ "self": "https://127.0.0.1:9001/v2/zones/a86dba58-0043-4cc6-a1bb-69d5e86f3ca3", }, }
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", Description: "This is another example zone.", Masters: []string{"example.com."}, CreatedAt: "2014-07-07T18:25:31.275934", UpdatedAt: "2015-02-25T20:23:01.234567", Links: map[string]interface{}{ "self": "https://127.0.0.1:9001/v2/zones/34c4561c-9205-4386-9df5-167436f5a222", }, }
Functions ¶
func HandleCreateSuccessfully ¶
HandleCreateSuccessfully configures the test server to respond to a Create request.
func HandleDeleteSuccessfully ¶
HandleDeleteSuccessfully 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 ¶
HandleUpdateSuccessfully configures the test server to respond to an Update request.
Types ¶
This section is empty.