testing

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const CreateRequest = `
{
	"license_type": "vCenter Server 6.x Standard"
}
`

CreateRequest provides the input to a Create request.

View Source
const GetResult = `` /* 225-byte string literal not displayed */

GetResult provides a Get result.

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

ListResult provides a single page of License results.

Variables

View Source
var ExpectedLicensesSlice = []licenses.License{FirstLicense, SecondLicense}

ExpectedLicensesSlice is the slice of Licenses expected to be returned from ListResult.

View Source
var FirstLicense = licenses.License{
	ID:           "02471b45-3de0-4fc8-8469-a7cc52c378df",
	Key:          "5H69L-8C3D7-K8292-03926-CREMN",
	AssignedFrom: time.Date(2017, 4, 27, 9, 20, 47, 0, time.UTC),
	ExpiresAt:    nil,
	LicenseType:  "vCenter Server 6.x Standard",
}

FirstLicense is the first License in the List request.

View Source
var SecondLicense = licenses.License{
	ID:           "0801a388-68e8-4e41-9158-73571117c915",
	Key:          "0021L-8CJ47-2829A-0A8K2-CXN4J",
	AssignedFrom: time.Date(2017, 6, 1, 4, 13, 31, 0, time.UTC),
	ExpiresAt:    nil,
	LicenseType:  "vCenter Server 6.x Standard",
}

SecondLicense is the second License in the List request.

Functions

func HandleCreateLicenseSuccessfully

func HandleCreateLicenseSuccessfully(t *testing.T)

HandleCreateLicenseSuccessfully creates an HTTP handler at `/licenses` on the test handler mux that tests License creation.

func HandleDeleteLicenseSuccessfully

func HandleDeleteLicenseSuccessfully(t *testing.T)

HandleDeleteLicenseSuccessfully creates an HTTP handler at `/licenses` on the test handler mux that tests License deletion.

func HandleListLicensesSuccessfully

func HandleListLicensesSuccessfully(t *testing.T)

HandleListLicenseSuccessfully creates an HTTP handler at `/licenses` on the test handler mux that responds with a list of two Licenses.

Types

This section is empty.

Jump to

Keyboard shortcuts

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