Documentation ¶
Index ¶
- Constants
- Variables
- func HandleCreateLimitSuccessfully(t *testing.T)
- func HandleDeleteLimitSuccessfully(t *testing.T)
- func HandleGetEnforcementModelSuccessfully(t *testing.T)
- func HandleGetLimitSuccessfully(t *testing.T)
- func HandleListLimitsSuccessfully(t *testing.T)
- func HandleUpdateLimitSuccessfully(t *testing.T)
Constants ¶
const CreateOutput = ListOutput
const CreateRequest = `` /* 590-byte string literal not displayed */
const GetEnforcementModelOutput = `` /* 160-byte string literal not displayed */
const GetOutput = `` /* 495-byte string literal not displayed */
const ListOutput = `` /* 1222-byte string literal not displayed */
ListOutput provides a single page of List results.
const UpdateOutput = `` /* 505-byte string literal not displayed */
const UpdateRequest = `` /* 145-byte string literal not displayed */
Variables ¶
var ExpectedLimitsSlice = []limits.Limit{FirstLimit, SecondLimit}
ExpectedLimitsSlice is the slice of limits expected to be returned from ListOutput.
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.
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.
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.
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 ¶
HandleCreateLimitSuccessfully creates an HTTP handler at `/limits` on the test handler mux that tests limit creation.
func HandleDeleteLimitSuccessfully ¶
HandleDeleteLimitSuccessfully creates an HTTP handler at `/limits` on the test handler mux that tests limit deletion.
func HandleGetEnforcementModelSuccessfully ¶
HandleGetEnforcementModelSuccessfully creates an HTTP handler at `/limits/model` on the test handler mux that responds with a enforcement model.
func HandleGetLimitSuccessfully ¶
HandleGetLimitSuccessfully creates an HTTP handler at `/limits` on the test handler mux that responds with a single limit.
func HandleListLimitsSuccessfully ¶
HandleListLimitsSuccessfully creates an HTTP handler at `/limits` on the test handler mux that responds with a list of two limits.
func HandleUpdateLimitSuccessfully ¶
HandleUpdateLimitSuccessfully creates an HTTP handler at `/limits` on the test handler mux that tests limit update.
Types ¶
This section is empty.