testhelpers

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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