Documentation ¶
Overview ¶
transfer requests unit tests
Index ¶
Constants ¶
const CreateTransferRequest = `` /* 138-byte string literal not displayed */
CreateTransferRequest is a sample request to create a zone.
const CreateTransferRequestResponse = `` /* 563-byte string literal not displayed */
CreateZoneResponse is a sample response to a create request.
const GetOutput = `` /* 563-byte string literal not displayed */
GetOutput is a sample response to a Get call.
const ListOutput = `` /* 1538-byte string literal not displayed */
ListOutput is a sample response to a List call.
const UpdateTransferRequest = `
{
"description": "Updated Description"
}
`
UpdateTransferRequest is a sample request to update a zone transfer request.
const UpdatedTransferRequestResponse = `` /* 536-byte string literal not displayed */
UpdatedTransferRequestResponse is a sample response to update a zone transfer request.
Variables ¶
var CreatedTransferRequest = FirstTransferRequest
CreatedTransferRequest is the expected created zone transfer request.
var ExpectedTransferRequestsSlice = []transferRequests.TransferRequest{FirstTransferRequest, SecondTransferRequest}
ExpectedTransferRequestsSlice is the slice of results that should be parsed from ListOutput, in the expected order.
var FirstTransferRequest = transferRequests.TransferRequest{ ID: "a86dba58-0043-4cc6-a1bb-69d5e86f3ca3", ZoneID: "a6a8515c-5d80-48c0-955b-fde631b59791", ProjectID: "4335d1f0-f793-11e2-b778-0800200c9a66", TargetProjectID: "05d98711-b3a1-4264-a395-f46383671ee6", ZoneName: "example1.org.", Key: "KJSDH23Z", Description: "This is a first example zone transfer request.", Status: "ACTIVE", CreatedAt: FirstTransferRequestCreatedAt, Links: map[string]interface{}{ "self": "https://127.0.0.1:9001/v2/zones/tasks/transfer_requests/a86dba58-0043-4cc6-a1bb-69d5e86f3ca3", }, }
var FirstTransferRequestCreatedAt, _ = time.Parse(gophercloud.RFC3339MilliNoZ, "2020-10-12T08:38:58.000000")
FirstTransferRequest is the first result in ListOutput
var SecondTransferRequest = transferRequests.TransferRequest{ ID: "34c4561c-9205-4386-9df5-167436f5a222", ZoneID: "572ba08c-d929-4c70-8e42-03824bb24ca2", ProjectID: "4335d1f0-f793-11e2-b778-0800200c9a66", TargetProjectID: "05d98711-b3a1-4264-a395-f46383671ee6", ZoneName: "example2.org.", Key: "KSDFJ22H", Description: "This is second example zone transfer request.", Status: "ACTIVE", CreatedAt: SecondTransferRequestCreatedAt, UpdatedAt: SecondTransferRequestUpdatedAt, Links: map[string]interface{}{ "self": "https://127.0.0.1:9001/v2/zones/tasks/transfer_requests/34c4561c-9205-4386-9df5-167436f5a222", }, }
var SecondTransferRequestCreatedAt, _ = time.Parse(gophercloud.RFC3339MilliNoZ, "2020-10-12T09:38:58.000000")
SecondTransferRequest is the second result in ListOutput
var SecondTransferRequestUpdatedAt, _ = time.Parse(gophercloud.RFC3339MilliNoZ, "2020-10-12T10:38:58.000000")
Functions ¶
func HandleCreateSuccessfully ¶
HandleTransferRequestCreationSuccessfully configures the test server to respond to a Create request.
func HandleDeleteSuccessfully ¶
HandleTransferRequestDeleteSuccessfully 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 ¶
HandleTransferRequestUpdateSuccessfully configures the test server to respond to an Update request.
Types ¶
This section is empty.