testing

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Compute Server unit tests

Index

Constants

View Source
const CreateRequest = `` /* 340-byte string literal not displayed */

CreateRequest provides the input to a Create request.

View Source
const CreateResponse = `` /* 526-byte string literal not displayed */
View Source
const GetResult = `` /* 1811-byte string literal not displayed */

GetResult provides a Get result.

View Source
const ListDetailsResult = `` /* 3749-byte string literal not displayed */

ListDetailsResult provides a single page of Server results in details.

View Source
const ListResult = `` /* 877-byte string literal not displayed */

ListResult provides a single page of Server results.

View Source
const UpdateRequest = `
{
	"server": {
		"name": "Update Name"
	}
}
`
View Source
const UpdateResponse = `` /* 1394-byte string literal not displayed */

Variables

View Source
var CreateImageRequest = `
{
	"createImage": {
		"metadata": {
			"key": "create_image"
		},
		"name": "Test Create Image"
	}
}
`
View Source
var CreateMetadatumRequest = `
{
	"meta": {
		"key1": "val1"
	}
}
`
View Source
var CreateMetadatumResponse = CreateMetadatumRequest
View Source
var MetadataResult = `
{
	"metadata": {
		"vmha": "false",
		"HA_Enabled": "false"
	}
}
`
View Source
var MetadatumResult = `
{
	"meta": {
		"vmha": "false"
	}
}
`
View Source
var ResetMetadataRequest = `
{
	"metadata": {
		"key1": "val1",
		"key2": "val2"
	}
}
`
View Source
var ResetMetadataResponse = ResetMetadataRequest
View Source
var ResizeRequest = `
{
	"resize": {
		"flavorRef": "2CPU-8GB"
	}
}
`
View Source
var UpdateMetadataRequest = `
{
	"metadata": {
		"key1": "update_val"
	}
}
`
View Source
var UpdateMetadataResponse = UpdateMetadataRequest

Functions

func HandleCreateImageSuccessfully

func HandleCreateImageSuccessfully(t *testing.T)

HandleCreateImageSuccessfully creates an HTTP handler at `/servers` on the test handler mux that tests create server image.

func HandleCreateMetadatumSuccessfully

func HandleCreateMetadatumSuccessfully(t *testing.T)

HandleCreateMetadatumSuccessfully creates an HTTP handler at `/servers` on the test handler mux that tests server metadata creation.

func HandleCreateServerSuccessfully

func HandleCreateServerSuccessfully(t *testing.T)

HandleCreateServerSuccessfully creates an HTTP handler at `/servers` on the test handler mux that tests server creation.

func HandleDeleteMetadatumSuccessfully

func HandleDeleteMetadatumSuccessfully(t *testing.T)

HandleDeleteMetadatumSuccessfully creates an HTTP handler at `/servers` on the test handler mux that tests server metadata deletion.

func HandleDeleteServerSuccessfully

func HandleDeleteServerSuccessfully(t *testing.T)

HandleDeleteServerSuccessfully creates an HTTP handler at `/servers` on the test handler mux that tests server deletion.

func HandleGetMetadataSuccessfully

func HandleGetMetadataSuccessfully(t *testing.T)

HandleGetMetadataSuccessfully creates an HTTP handler at `/servers` on the test handler mux that responds with a server metadata.

func HandleGetMetadatumSuccessfully

func HandleGetMetadatumSuccessfully(t *testing.T)

HandleGetMetadatumSuccessfully creates an HTTP handler at `/servers` on the test handler mux that responds with a server metadatum.

func HandleGetServerSuccessfully

func HandleGetServerSuccessfully(t *testing.T)

HandleGetServerSuccessfully creates an HTTP handler at `/servers` on the test handler mux that responds with a single server.

func HandleListServersDetailsSuccessfully

func HandleListServersDetailsSuccessfully(t *testing.T)

HandleListServersDetailsSuccessfully creates an HTTP handler at `/servers/detail` on the test handler mux that responds with a list of two servers.

func HandleListServersSuccessfully

func HandleListServersSuccessfully(t *testing.T)

HandleListServersSuccessfully creates an HTTP handler at `/servers` on the test handler mux that responds with a list of two servers.

func HandleResetMetadataSuccessfully

func HandleResetMetadataSuccessfully(t *testing.T)

HandleResetMetadataSuccessfully creates an HTTP handler at `/servers` on the test handler mux that tests server metadata reset.

func HandleResizeServerSuccessfully

func HandleResizeServerSuccessfully(t *testing.T)

HandleResizeServerSuccessfully creates an HTTP handler at `/servers` on the test handler mux that tests server resize action.

func HandleUpdateMetadataSuccessfully

func HandleUpdateMetadataSuccessfully(t *testing.T)

HandleUpdateMetadataSuccessfully creates an HTTP handler at `/servers` on the test handler mux that tests server metadata update.

func HandleUpdateServerSuccessfully

func HandleUpdateServerSuccessfully(t *testing.T)

HandleUpdateServerSuccessfully creates an HTTP handler at `/servers` on the test handler mux that tests server update.

Types

This section is empty.

Jump to

Keyboard shortcuts

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