testing

package
Version: v1.0.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

recordsets unit tests

Index

Constants

View Source
const CreateRecordSetRequest = `` /* 153-byte string literal not displayed */

CreateRecordSetRequest is a sample request to create a resource record.

View Source
const CreateRecordSetResponse = `` /* 652-byte string literal not displayed */

CreateRecordSetResponse is a sample response to a create request.

View Source
const DeleteRecordSetResponse = `` /* 661-byte string literal not displayed */

DeleteRecordSetResponse is a sample response to a delete request.

View Source
const GetOutput = `` /* 610-byte string literal not displayed */

GetOutput is a sample response to a Get call.

View Source
const ListByZoneOutput = `` /* 1900-byte string literal not displayed */

ListByZoneOutput is a sample response to a ListByZone call.

View Source
const ListByZoneOutputLimited = `` /* 1030-byte string literal not displayed */

ListByZoneOutputLimited is a sample response to a ListByZone call with a requested limit.

View Source
const NextPageRequest = `` /* 269-byte string literal not displayed */

NextPageRequest is a sample request to test pagination.

View Source
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.

View Source
const UpdateRecordSetResponse = `` /* 661-byte string literal not displayed */

UpdateRecordSetResponse is a sample response to an update request.

Variables

View Source
var CreatedRecordSet = FirstRecordSet

CreatedRecordSet is the expected created resource record.

ExpectedRecordSetSlice is the slice of results that should be parsed from ListByZoneOutput, in the expected order.

View Source
var ExpectedRecordSetSliceLimited = []recordsets.RecordSet{SecondRecordSet}

ExpectedRecordSetSliceLimited is the slice of limited results that should be parsed from ListByZoneOutput.

View Source
var FirstRecordSet = recordsets.RecordSet{
	ID:          "f7b10e9b-0cae-4a91-b162-562bc6096648",
	Description: "This is an example record set.",
	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:   "2014-10-24T19:59:44.000000",
	Type:        "A",
	Status:      "PENDING",
	Links: recordsets.Link{
		Self: "https://127.0.0.1:9001/v2/zones/2150b1bf-dee2-4221-9d85-11f7886fb15f/recordsets/f7b10e9b-0cae-4a91-b162-562bc6096648",
	},
}
View Source
var FirstRecordSetCreatedAt, _ = time.Parse(gophercloud.RFC3339MilliNoZ, "2014-10-24T19:59:44.000000")

FirstRecordSet is the first result in ListByZoneOutput

View Source
var SecondRecordSet = recordsets.RecordSet{
	ID:          "7423aeaf-b354-4bd7-8aba-2e831567b478",
	Description: "This is another example record set.",
	UpdatedAt:   "2017-03-04T14:29:07.000000",
	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:   "2014-10-24T19:59:44.000000",
	Type:        "A",
	Status:      "PENDING",
	Links: recordsets.Link{
		Self: "https://127.0.0.1:9001/v2/zones/2150b1bf-dee2-4221-9d85-11f7886fb15f/recordsets/7423aeaf-b354-4bd7-8aba-2e831567b478",
	},
}

SecondRecordSet is the first result in ListByZoneOutput

Functions

func HandleCreateSuccessfully

func HandleCreateSuccessfully(t *testing.T)

HandleZoneCreationSuccessfully configures the test server to respond to a Create request.

func HandleDeleteSuccessfully

func HandleDeleteSuccessfully(t *testing.T)

HandleDeleteSuccessfully configures the test server to respond to an Delete request.

func HandleGetSuccessfully

func HandleGetSuccessfully(t *testing.T)

HandleGetSuccessfully configures the test server to respond to a Get request.

func HandleListByZoneSuccessfully

func HandleListByZoneSuccessfully(t *testing.T)

HandleListByZoneSuccessfully configures the test server to respond to a ListByZone request.

func HandleUpdateSuccessfully

func HandleUpdateSuccessfully(t *testing.T)

HandleUpdateSuccessfully configures the test server to respond to an Update request.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL