testhelpers

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Port = 5001

	CloudPath = "/tmp/clouds.yaml"
	ID        = "0123456789"
	TokenID   = "cbc36478b0bd8e67e89469c7749d4127"

	FIPCreate = `` /* 505-byte string literal not displayed */

	ListResponse = `` /* 1515-byte string literal not displayed */

	CreateKeyPairOutput = `` /* 1307-byte string literal not displayed */

	SingleServerBody = `` /* 1923-byte string literal not displayed */

)

Variables

View Source
var (
	// Mux is a multiplexer that can be used to register handlers.
	Mux *http.ServeMux

	// Server is an in-memory HTTP server for testing.
	Server *httptest.Server
)

Functions

func CommonServiceClient

func CommonServiceClient() *gophercloud.ServiceClient

func Endpoint

func Endpoint() string

Endpoint returns a fake endpoint that will actually target the Mux.

func GenerateCloudsFile

func GenerateCloudsFile() error

GenerateCloudsFile creates a cloud file for testing

func ServiceClient

func ServiceClient() *gophercloud.ServiceClient

ServiceClient returns a generic service client for use in tests.

func SetupPersistentPortHTTP

func SetupPersistentPortHTTP(t *testing.T, port int)

SetupPersistentPortHTTP prepares the Mux and Server listening specific port.

func TeardownHTTP

func TeardownHTTP()

TeardownHTTP releases HTTP-related resources.

Types

This section is empty.

Jump to

Keyboard shortcuts

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