testing

package
v1.1.16 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

instanceactions unit tests

Index

Constants

This section is empty.

Variables

View Source
var GetExpected = instanceactions.InstanceActionDetail{
	Action:       "stop",
	InstanceUUID: "4bf3473b-d550-4b65-9409-292d44ab14a2",
	Message:      "",
	ProjectID:    "6f70656e737461636b20342065766572",
	RequestID:    "req-0d819d5c-1527-4669-bdf0-ffad31b5105b",
	StartTime:    time.Date(2018, 04, 25, 1, 26, 36, 0, time.UTC),
	UpdatedAt:    &expectedUpdateAt,
	UserID:       "admin",
	Events:       &expectedEvents,
}

GetExpected represents an expected repsonse from a Get request.

View Source
var ListExpected = []instanceactions.InstanceAction{
	{
		Action:       "stop",
		InstanceUUID: "fcd19ef2-b593-40b1-90a5-fc31063fa95c",
		Message:      "",
		ProjectID:    "6f70656e737461636b20342065766572",
		RequestID:    "req-f8a59f03-76dc-412f-92c2-21f8612be728",
		StartTime:    time.Date(2018, 04, 25, 1, 26, 29, 000000, time.UTC),
		UserID:       "admin",
	},
	{
		Action:       "create",
		InstanceUUID: "fcd19ef2-b593-40b1-90a5-fc31063fa95c",
		Message:      "test",
		ProjectID:    "6f70656e737461636b20342065766572",
		RequestID:    "req-50189019-626d-47fb-b944-b8342af09679",
		StartTime:    time.Date(2018, 04, 25, 1, 26, 25, 000000, time.UTC),
		UserID:       "admin",
	},
}

ListExpected represents an expected repsonse from a List request.

Functions

func HandleInstanceActionGetSuccessfully

func HandleInstanceActionGetSuccessfully(t *testing.T)

HandleInstanceActionGetSuccessfully sets up the test server to respond to a Get request.

func HandleInstanceActionListSuccessfully

func HandleInstanceActionListSuccessfully(t *testing.T)

HandleInstanceActionListSuccessfully sets up the test server to respond to a ListAddresses request.

Types

This section is empty.

Jump to

Keyboard shortcuts

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