testing

package
v0.0.0-...-56e5f01 Latest Latest
Warning

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

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

Documentation

Overview

quotasets unit tests

Index

Constants

View Source
const FirstTenantID = "555544443333222211110000ffffeeee"
View Source
const GetDetailsOutput = `` /* 1358-byte string literal not displayed */

GetDetailsOutput is a sample response to a Get call with the detailed option.

View Source
const GetOutput = `` /* 383-byte string literal not displayed */

GetOutput is a sample response to a Get call.

View Source
const PartialUpdateBody = `{"quota_set":{"cores":200, "force":true}}`

The expected partialupdate Body. Is also returned by PUT request

View Source
const UpdateOutput = `` /* 299-byte string literal not displayed */

The expected update Body. Is also returned by PUT request

Variables

View Source
var FirstQuotaDetailsSet = quotasets.QuotaDetailSet{
	ID:                       FirstTenantID,
	InjectedFileContentBytes: quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 10240},
	InjectedFilePathBytes:    quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 255},
	InjectedFiles:            quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 5},
	KeyPairs:                 quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 10},
	MetadataItems:            quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 128},
	RAM:                      quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 9216000},
	SecurityGroupRules:       quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 20},
	SecurityGroups:           quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 10},
	Cores:                    quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 200},
	Instances:                quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 25},
	ServerGroups:             quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 2},
	ServerGroupMembers:       quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 3},
}

FirstQuotaDetailsSet is the first result in ListOutput.

View Source
var FirstQuotaSet = quotasets.QuotaSet{
	FixedIPs:                 0,
	FloatingIPs:              0,
	InjectedFileContentBytes: 10240,
	InjectedFilePathBytes:    255,
	InjectedFiles:            5,
	KeyPairs:                 10,
	MetadataItems:            128,
	RAM:                      9216000,
	SecurityGroupRules:       20,
	SecurityGroups:           10,
	Cores:                    200,
	Instances:                25,
	ServerGroups:             2,
	ServerGroupMembers:       3,
}

FirstQuotaSet is the first result in ListOutput.

View Source
var UpdatedQuotaSet = quotasets.UpdateOpts{
	FixedIPs:                 gophercloud.IntToPointer(0),
	FloatingIPs:              gophercloud.IntToPointer(0),
	InjectedFileContentBytes: gophercloud.IntToPointer(10240),
	InjectedFilePathBytes:    gophercloud.IntToPointer(255),
	InjectedFiles:            gophercloud.IntToPointer(5),
	KeyPairs:                 gophercloud.IntToPointer(10),
	MetadataItems:            gophercloud.IntToPointer(128),
	RAM:                      gophercloud.IntToPointer(9216000),
	SecurityGroupRules:       gophercloud.IntToPointer(20),
	SecurityGroups:           gophercloud.IntToPointer(10),
	Cores:                    gophercloud.IntToPointer(200),
	Instances:                gophercloud.IntToPointer(25),
	ServerGroups:             gophercloud.IntToPointer(2),
	ServerGroupMembers:       gophercloud.IntToPointer(3),
}

Result of Quota-update

Functions

func HandleDeleteSuccessfully

func HandleDeleteSuccessfully(t *testing.T)

HandleDeleteSuccessfully configures the test server to respond to a Delete request for sample tenant

func HandleGetDetailSuccessfully

func HandleGetDetailSuccessfully(t *testing.T)

HandleGetDetailSuccessfully configures the test server to respond to a Get Details request for sample tenant

func HandleGetSuccessfully

func HandleGetSuccessfully(t *testing.T)

HandleGetSuccessfully configures the test server to respond to a Get request for sample tenant

func HandlePartialPutSuccessfully

func HandlePartialPutSuccessfully(t *testing.T)

HandlePartialPutSuccessfully configures the test server to respond to a Put request for sample tenant that only containes specific values

func HandlePutSuccessfully

func HandlePutSuccessfully(t *testing.T)

HandlePutSuccessfully configures the test server to respond to a Put request for sample tenant

Types

This section is empty.

Jump to

Keyboard shortcuts

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