Help us shape the future of Go! Take the 2026 Go Developer Survey

testing

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const GetEnforcementModelOutput = `` /* 160-byte string literal not displayed */
View Source
const ListOutput = `` /* 1222-byte string literal not displayed */

ListOutput provides a single page of List results.

Variables

View Source
var ExpectedLimitsSlice = []limits.Limit{FirstLimit, SecondLimit}

ExpectedLimitsSlice is the slice of limits expected to be returned from ListOutput.

View Source
var FirstLimit = limits.Limit{
	ResourceName: "volume",
	Links: map[string]interface{}{
		"self": "http://10.3.150.25/identity/v3/limits/25a04c7a065c430590881c646cdcdd58",
	},
	ServiceID:     "9408080f1970482aa0e38bc2d4ea34b7",
	ProjectID:     "3a705b9f56bb439381b43c4fe59dccce",
	ID:            "25a04c7a065c430590881c646cdcdd58",
	ResourceLimit: 11,
	Description:   "Number of volumes for project 3a705b9f56bb439381b43c4fe59dccce",
}

FirstLimit is the first limit in the List request.

View Source
var Model = limits.EnforcementModel{
	Name:        "flat",
	Description: "Limit enforcement and validation does not take project hierarchy into consideration.",
}

Model is the enforcement model in the GetEnforcementModel request.

View Source
var SecondLimit = limits.Limit{
	ResourceName: "snapshot",
	RegionID:     "RegionOne",
	Links: map[string]interface{}{
		"self": "http://10.3.150.25/identity/v3/limits/3229b3849f584faea483d6851f7aab05",
	},
	ServiceID:     "9408080f1970482aa0e38bc2d4ea34b7",
	ProjectID:     "3a705b9f56bb439381b43c4fe59dccce",
	ID:            "3229b3849f584faea483d6851f7aab05",
	ResourceLimit: 5,
}

SecondLimit is the second limit in the List request.

Functions

func HandleGetEnforcementModelSuccessfully added in v1.1.0

func HandleGetEnforcementModelSuccessfully(t *testing.T)

HandleGetEnforcementModelSuccessfully creates an HTTP handler at `/limits/model` on the test handler mux that responds with a enforcement model.

func HandleListLimitsSuccessfully

func HandleListLimitsSuccessfully(t *testing.T)

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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