testing

package
Version: v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

servergroups unit tests

Index

Constants

View Source
const CreateOutput = `` /* 218-byte string literal not displayed */

CreateOutput is a sample response to a Post call

View Source
const CreateOutputMicroversion = `` /* 318-byte string literal not displayed */

CreateOutputMicroversion is a sample response to a Post call with microversion set to 2.64

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

GetOutput is a sample response to a Get call.

View Source
const GetOutputMicroversion = `` /* 318-byte string literal not displayed */

GetOutputMicroversion is a sample response to a Get call with microversion set to 2.64

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

ListOutput is a sample response to a List call.

Variables

View Source
var CreatedServerGroup = servergroups.ServerGroup{
	ID:   "616fb98f-46ca-475e-917e-2563e5a8cd19",
	Name: "test",
	Policies: []string{
		"anti-affinity",
	},
	Members:  []string{},
	Metadata: map[string]interface{}{},
}

CreatedServerGroup is the parsed result from CreateOutput.

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

View Source
var FirstServerGroup = servergroups.ServerGroup{
	ID:   "616fb98f-46ca-475e-917e-2563e5a8cd19",
	Name: "test",
	Policies: []string{
		"anti-affinity",
	},
	Members:  []string{},
	Metadata: map[string]interface{}{},
}

FirstServerGroup is the first result in ListOutput.

View Source
var SecondServerGroup = servergroups.ServerGroup{
	ID:   "4d8c3732-a248-40ed-bebc-539a6ffd25c0",
	Name: "test2",
	Policies: []string{
		"affinity",
	},
	Members:  []string{},
	Metadata: map[string]interface{}{},
}

SecondServerGroup is the second result in ListOutput.

Functions

func HandleCreateMicroversionSuccessfully added in v0.3.0

func HandleCreateMicroversionSuccessfully(t *testing.T)

HandleCreateMicroversionSuccessfully configures the test server to respond to a Create request for a new server group with microversion set to 2.64

func HandleCreateSuccessfully

func HandleCreateSuccessfully(t *testing.T)

HandleCreateSuccessfully configures the test server to respond to a Create request for a new server group

func HandleDeleteSuccessfully

func HandleDeleteSuccessfully(t *testing.T)

HandleDeleteSuccessfully configures the test server to respond to a Delete request for a an existing server group

func HandleGetMicroversionSuccessfully added in v0.3.0

func HandleGetMicroversionSuccessfully(t *testing.T)

HandleGetMicroversionSuccessfully configures the test server to respond to a Get request for an existing server group with microversion set to 2.64

func HandleGetSuccessfully

func HandleGetSuccessfully(t *testing.T)

HandleGetSuccessfully configures the test server to respond to a Get request for an existing server group

func HandleListSuccessfully

func HandleListSuccessfully(t *testing.T)

HandleListSuccessfully configures the test server to respond to a List request.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL