testing

package
v1.0.21 Latest Latest
Warning

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

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

Documentation

Overview

common extensions unit tests

Index

Constants

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

GetOutput provides a single Extension result.

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

ListOutput provides a single page of Extension results.

Variables

View Source
var ExpectedExtensions = []extensions.Extension{ListedExtension}

ExpectedExtensions is a slice containing the Extension that should be parsed from ListOutput.

View Source
var ListedExtension = extensions.Extension{
	Updated:     "2013-01-20T00:00:00-00:00",
	Name:        "Neutron Service Type Management",
	Links:       []interface{}{},
	Namespace:   "http://docs.openstack.org/ext/neutron/service-type/api/v1.0",
	Alias:       "service-type",
	Description: "API for retrieving service providers for Neutron advanced services",
}

ListedExtension is the Extension that should be parsed from ListOutput.

View Source
var SingleExtension = &extensions.Extension{
	Updated:     "2013-02-03T10:00:00-00:00",
	Name:        "agent",
	Links:       []interface{}{},
	Namespace:   "http://docs.openstack.org/ext/agent/api/v2.0",
	Alias:       "agent",
	Description: "The agent management extension.",
}

SingleExtension is the Extension that should be parsed from GetOutput.

Functions

func HandleGetExtensionSuccessfully

func HandleGetExtensionSuccessfully(t *testing.T)

HandleGetExtensionSuccessfully creates an HTTP handler at `/extensions/agent` that responds with a JSON payload corresponding to SingleExtension.

func HandleListExtensionsSuccessfully

func HandleListExtensionsSuccessfully(t *testing.T)

HandleListExtensionsSuccessfully creates an HTTP handler at `/extensions` on the test handler mux that response with a list containing a single tenant.

Types

This section is empty.

Jump to

Keyboard shortcuts

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