testing

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

zones unit tests

Index

Constants

View Source
const CreateZoneRequest = `` /* 128-byte string literal not displayed */

CreateZoneRequest is a sample request to create a zone.

View Source
const CreateZoneResponse = `` /* 539-byte string literal not displayed */

CreateZoneResponse is a sample response to a create request.

View Source
const DeleteZoneResponse = `` /* 534-byte string literal not displayed */

DeleteZoneResponse is a sample response to update a zone.

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

GetOutput is a sample response to a Get call.

View Source
const ListOutput = `` /* 1546-byte string literal not displayed */

ListOutput is a sample response to a List call.

View Source
const UpdateZoneRequest = `
{
    "ttl": 600,
    "description": "Updated Description"
}
`

UpdateZoneRequest is a sample request to update a zone.

View Source
const UpdateZoneResponse = `` /* 534-byte string literal not displayed */

UpdateZoneResponse is a sample response to update a zone.

Variables

View Source
var CreatedZone = FirstZone

CreatedZone is the expected created zone

View Source
var ExpectedZonesSlice = []zones.Zone{FirstZone, SecondZone}

ExpectedZonesSlice is the slice of results that should be parsed from ListOutput, in the expected order.

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

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

func HandleCreateSuccessfully(t *testing.T)

HandleCreateSuccessfully 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 List request.

func HandleListSuccessfully

func HandleListSuccessfully(t *testing.T)

HandleListSuccessfully configures the test server to respond to a List 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