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

testing

package
v1.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const CreateOutput = ListOutput
View Source
const CreateRequest = `` /* 590-byte string literal not displayed */
View Source
const GetEnforcementModelOutput = `` /* 160-byte string literal not displayed */
View Source
const GetOutput = `` /* 495-byte string literal not displayed */
View Source
const ListOutput = `` /* 1222-byte string literal not displayed */

ListOutput provides a single page of List results.

View Source
const UpdateOutput = `` /* 505-byte string literal not displayed */
View Source
const UpdateRequest = `` /* 145-byte string literal not displayed */

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.

View Source
var SecondLimitUpdated = 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,
	Description:   "Number of snapshots for project 3a705b9f56bb439381b43c4fe59dccce",
}

SecondLimitUpdated is the updated limit in the Update request.

Functions

func HandleCreateLimitSuccessfully added in v1.3.0

func HandleCreateLimitSuccessfully(t *testing.T)

HandleCreateLimitSuccessfully creates an HTTP handler at `/limits` on the test handler mux that tests limit creation.

func HandleDeleteLimitSuccessfully added in v1.4.0

func HandleDeleteLimitSuccessfully(t *testing.T)

HandleDeleteLimitSuccessfully creates an HTTP handler at `/limits` on the test handler mux that tests limit deletion.

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 HandleGetLimitSuccessfully added in v1.4.0

func HandleGetLimitSuccessfully(t *testing.T)

HandleGetLimitSuccessfully creates an HTTP handler at `/limits` on the test handler mux that responds with a single limit.

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.

func HandleUpdateLimitSuccessfully added in v1.4.0

func HandleUpdateLimitSuccessfully(t *testing.T)

HandleUpdateLimitSuccessfully creates an HTTP handler at `/limits` on the test handler mux that tests limit update.

Types

This section is empty.

Jump to

Keyboard shortcuts

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