testing

package
v0.0.0-...-08576c7 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const AmphoraeListBody = `` /* 1861-byte string literal not displayed */

AmphoraeListBody contains the canned body of a amphora list response.

View Source
const SingleAmphoraBody = `` /* 714-byte string literal not displayed */

Variables

View Source
var ExpectedAmphoraeSlice = []amphorae.Amphora{FirstAmphora, SecondAmphora}

ExpectedAmphoraeSlice is the slice of amphorae expected to be returned from ListResponse.

View Source
var FirstAmphora = amphorae.Amphora{
	CachedZone:     "nova",
	CertBusy:       false,
	CertExpiration: time.Date(2020, 8, 8, 23, 44, 31, 0, time.UTC),
	ComputeID:      "667bb225-69aa-44b1-8908-694dc624c267",
	CreatedAt:      time.Date(2018, 8, 9, 23, 44, 31, 0, time.UTC),
	HAIP:           "10.0.0.6",
	HAPortID:       "35254b63-9361-4561-9b8f-2bb4e3be60e3",
	ID:             "45f40289-0551-483a-b089-47214bc2a8a4",
	ImageID:        "5d1aed06-2624-43f5-a413-9212263c3d53",
	LBNetworkIP:    "192.168.0.6",
	LoadbalancerID: "882f2a9d-9d53-4bd0-b0e9-08e9d0de11f9",
	Role:           "MASTER",
	Status:         "READY",
	UpdatedAt:      time.Date(2018, 8, 9, 23, 51, 6, 0, time.UTC),
	VRRPID:         1,
	VRRPInterface:  "eth1",
	VRRPIP:         "10.0.0.4",
	VRRPPortID:     "dcf0c8b5-6a08-4658-997d-eac97f2b9bbd",
	VRRPPriority:   100,
}

FirstAmphora is the first resource in the List request.

View Source
var SecondAmphora = amphorae.Amphora{
	CachedZone:     "nova",
	CertBusy:       false,
	CertExpiration: time.Date(2020, 8, 8, 23, 44, 30, 0, time.UTC),
	ComputeID:      "9cd0f9a2-fe12-42fc-a7e3-5b6fbbe20395",
	CreatedAt:      time.Date(2018, 8, 9, 23, 44, 31, 0, time.UTC),
	HAIP:           "10.0.0.6",
	HAPortID:       "35254b63-9361-4561-9b8f-2bb4e3be60e3",
	ID:             "7f890893-ced0-46ed-8697-33415d070e5a",
	ImageID:        "5d1aed06-2624-43f5-a413-9212263c3d53",
	LBNetworkIP:    "192.168.0.17",
	LoadbalancerID: "882f2a9d-9d53-4bd0-b0e9-08e9d0de11f9",
	Role:           "BACKUP",
	Status:         "READY",
	UpdatedAt:      time.Date(2018, 8, 9, 23, 51, 6, 0, time.UTC),
	VRRPID:         1,
	VRRPInterface:  "eth1",
	VRRPIP:         "10.0.0.21",
	VRRPPortID:     "13c88c77-207d-4f85-8f7a-84344592e367",
	VRRPPriority:   90,
}

SecondAmphora is the second resource in the List request.

Functions

func HandleAmphoraFailoverSuccessfully

func HandleAmphoraFailoverSuccessfully(t *testing.T)

HandleAmphoraFailoverSuccessfully sets up the test server to respond to an amphora failover request.

func HandleAmphoraGetSuccessfully

func HandleAmphoraGetSuccessfully(t *testing.T)

HandleAmphoraGetSuccessfully sets up the test server to respond to am amphora Get request.

func HandleAmphoraListSuccessfully

func HandleAmphoraListSuccessfully(t *testing.T)

HandleAmphoraListSuccessfully sets up the test server to respond to a amphorae 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