Documentation ¶
Overview ¶
recordsets unit tests
Index ¶
Constants ¶
const CreateRecordSetRequest = `` /* 153-byte string literal not displayed */
CreateRecordSetRequest is a sample request to create a resource record.
const CreateRecordSetResponse = `` /* 654-byte string literal not displayed */
CreateRecordSetResponse is a sample response to a create request.
const DeleteRecordSetResponse = `` /* 664-byte string literal not displayed */
DeleteRecordSetResponse is a sample response to a delete request.
const GetOutput = `` /* 612-byte string literal not displayed */
GetOutput is a sample response to a Get call.
const ListByZoneOutput = `` /* 1904-byte string literal not displayed */
ListByZoneOutput is a sample response to a ListByZone call.
const ListByZoneOutputLimited = `` /* 1090-byte string literal not displayed */
ListByZoneOutputLimited is a sample response to a ListByZone call with a requested limit.
const NextPageRequest = `` /* 269-byte string literal not displayed */
NextPageRequest is a sample request to test pagination.
const UpdateRecordSetRequest = `
{
"description" : "Updated description",
"ttl" : null,
"records" : [
"10.1.0.2",
"10.1.0.3"
]
}
`
UpdateRecordSetRequest is a sample request to update a record set.
const UpdateRecordSetResponse = `` /* 663-byte string literal not displayed */
UpdateRecordSetResponse is a sample response to an update request.
Variables ¶
var CreatedRecordSet = FirstRecordSet
CreatedRecordSet is the expected created resource record.
var ExpectedRecordSetSlice = []recordsets.RecordSet{FirstRecordSet, SecondRecordSet}
ExpectedRecordSetSlice is the slice of results that should be parsed from ListByZoneOutput, in the expected order.
var ExpectedRecordSetSliceLimited = []recordsets.RecordSet{SecondRecordSet}
ExpectedRecordSetSliceLimited is the slice of limited results that should be parsed from ListByZoneOutput.
var FirstRecordSet = recordsets.RecordSet{ ID: "f7b10e9b-0cae-4a91-b162-562bc6096648", Description: "This is an example record set.", UpdatedAt: time.Time{}, Records: []string{"10.1.0.2"}, TTL: 3600, Name: "example.org.", ProjectID: "4335d1f0-f793-11e2-b778-0800200c9a66", ZoneID: "2150b1bf-dee2-4221-9d85-11f7886fb15f", ZoneName: "example.com.", CreatedAt: FirstRecordSetCreatedAt, Version: 1, Type: "A", Status: "PENDING", Action: "CREATE", Links: []gophercloud.Link{ { Rel: "self", Href: "https://127.0.0.1:9001/v2/zones/2150b1bf-dee2-4221-9d85-11f7886fb15f/recordsets/f7b10e9b-0cae-4a91-b162-562bc6096648", }, }, }
var FirstRecordSetCreatedAt, _ = time.Parse(gophercloud.RFC3339MilliNoZ, "2014-10-24T19:59:44.000000")
FirstRecordSet is the first result in ListByZoneOutput
var SecondRecordSet = recordsets.RecordSet{ ID: "7423aeaf-b354-4bd7-8aba-2e831567b478", Description: "This is another example record set.", UpdatedAt: SecondRecordSetUpdatedAt, Records: []string{"10.1.0.3", "10.1.0.4"}, TTL: 3600, Name: "foo.example.org.", ProjectID: "4335d1f0-f793-11e2-b778-0800200c9a66", ZoneID: "2150b1bf-dee2-4221-9d85-11f7886fb15f", ZoneName: "example.com.", CreatedAt: SecondRecordSetCreatedAt, Version: 1, Type: "A", Status: "PENDING", Action: "CREATE", Links: []gophercloud.Link{ { Rel: "self", Href: "https://127.0.0.1:9001/v2/zones/2150b1bf-dee2-4221-9d85-11f7886fb15f/recordsets/7423aeaf-b354-4bd7-8aba-2e831567b478", }, }, }
var SecondRecordSetCreatedAt, _ = time.Parse(gophercloud.RFC3339MilliNoZ, "2014-10-24T19:59:44.000000")
SecondRecordSet is the first result in ListByZoneOutput
var SecondRecordSetUpdatedAt, _ = time.Parse(gophercloud.RFC3339MilliNoZ, "2017-03-04T14:29:07.000000")
Functions ¶
func HandleCreateSuccessfully ¶
HandleZoneCreationSuccessfully 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 Get request.
func HandleListByZoneSuccessfully ¶
HandleListByZoneSuccessfully configures the test server to respond to a ListByZone request.
func HandleUpdateSuccessfully ¶
HandleUpdateSuccessfully configures the test server to respond to an Update request.
Types ¶
This section is empty.