testing

package
v0.0.0-...-cd80d89 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

transfer requests unit tests

Index

Constants

View Source
const CreateTransferAccept = `
{
    "key": "M2KA0Y20",
    "zone_transfer_request_id": "fc46bb1f-bdf0-4e67-96e0-f8c04f26261c"
}
`

CreateTransferAccept is a sample request to create a zone.

View Source
const CreateTransferAcceptResponse = `` /* 552-byte string literal not displayed */

CreateTransferAcceptResponse is a sample response to a create request.

View Source
const FilteredListOutput = `` /* 746-byte string literal not displayed */

FilteredListOutput is a sample response to a List call with Opts.

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

GetOutput is a sample response to a Get call.

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

ListOutput is a sample response to a List call.

Variables

View Source
var CreatedTransferAccept = FirstTransferAccept

CreatedTransferRequest is the expected created zone transfer request.

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

View Source
var FirstTransferAccept = transferAccepts.TransferAccept{
	ID:                    "92236f39-0fad-4f8f-bf25-fbdf027de34d",
	ZoneID:                "cd046f4b-f4dc-4e41-b946-1a2d32e1be40",
	ProjectID:             "9f3cfb08bf52469abe598e127676cd57",
	ZoneTransferRequestID: "fc46bb1f-bdf0-4e67-96e0-f8c04f26261c",
	Key:                   "M2KA0Y20",
	Status:                "COMPLETE",
	CreatedAt:             FirstTransferAcceptCreatedAt,
	Links: map[string]interface{}{
		"self": "https://127.0.0.1:9001/v2/zones/tasks/transfer_accepts/92236f39-0fad-4f8f-bf25-fbdf027de34d",
		"zone": "https://127.0.0.1:9001/v2/zones/cd046f4b-f4dc-4e41-b946-1a2d32e1be40",
	},
}
View Source
var FirstTransferAcceptCreatedAt, _ = time.Parse(gophercloud.RFC3339MilliNoZ, "2020-10-12T08:38:58.000000")

FirstTransferAccept is the first result in ListOutput

View Source
var SecondTransferAccept = transferAccepts.TransferAccept{
	ID:                    "f785ef12-7ee0-4c30-bd67-a2b9edba0dff",
	Status:                "ACTIVE",
	ProjectID:             "9f3cfb08bf52469abe598e127676cd57",
	ZoneID:                "30d67a9a-d6df-4ba7-9b55-fb49e7987f84",
	ZoneTransferRequestID: "c5d11193-72ea-4d9f-ba04-7f80e99627fa",
	Key:                   "SDF32HJ1",
	CreatedAt:             SecondTransferAcceptCreatedAt,
	UpdatedAt:             SecondTransferAcceptUpdatedAt,
	Links: map[string]interface{}{
		"self": "https://127.0.0.1:9001/v2/zones/tasks/transfer_accepts/f785ef12-7ee0-4c30-bd67-a2b9edba0dff",
		"zone": "https://127.0.0.1:9001/v2/zones/30d67a9a-d6df-4ba7-9b55-fb49e7987f84",
	},
}
View Source
var SecondTransferAcceptCreatedAt, _ = time.Parse(gophercloud.RFC3339MilliNoZ, "2020-10-12T09:38:58.000000")

SecondTransferRequest is the second result in ListOutput

View Source
var SecondTransferAcceptUpdatedAt, _ = time.Parse(gophercloud.RFC3339MilliNoZ, "2020-10-12T09:38:58.000000")

Functions

func HandleCreateSuccessfully

func HandleCreateSuccessfully(t *testing.T)

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

func HandleFilteredListSuccessfully

func HandleFilteredListSuccessfully(t *testing.T)

HandleFilteredListSuccessfully configures the test server to respond to a List request with Opts.

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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