testing

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 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 = `` /* 654-byte string literal not displayed */

CreateRecordSetResponse is a sample response to a create request.

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

DeleteRecordSetResponse is a sample response to a delete request.

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

GetOutput is a sample response to a Get call.

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

ListByZoneOutput is a sample response to a ListByZone call.

View Source
const ListByZoneOutputLimited = `` /* 1090-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 = `` /* 663-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.",
	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",
		},
	},
}
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:   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",
		},
	},
}
View Source
var SecondRecordSetCreatedAt, _ = time.Parse(gophercloud.RFC3339MilliNoZ, "2014-10-24T19:59:44.000000")

SecondRecordSet is the first result in ListByZoneOutput

View Source
var SecondRecordSetUpdatedAt, _ = time.Parse(gophercloud.RFC3339MilliNoZ, "2017-03-04T14:29:07.000000")

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL