testing

package
v1.1.32 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const CreateRequest = `` /* 198-byte string literal not displayed */

CreateRequest provides the input to a Create request.

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

GetOutput provides a Get result.

View Source
const ListOutput = `` /* 800-byte string literal not displayed */

ListOutput provides a single page of Region results.

View Source
const UpdateOutput = `` /* 344-byte string literal not displayed */
// Due to a bug in Keystone, the Extra column of the Region table
// is not updatable, see: https://bugs.launchpad.net/keystone/+bug/1729933
// This following line should replace the email in UpdateOutput.extra once
// the fix is merged.

"email": "1stwestsupport@example.com"

UpdateOutput provides an update result.

View Source
const UpdateRequest = `
{
    "region": {
        "description": "First West sub-region of RegionOne"
    }
}
`
// Due to a bug in Keystone, the Extra column of the Region table
// is not updatable, see: https://bugs.launchpad.net/keystone/+bug/1729933
// The following line should be added to region in UpdateRequest once the
// fix is merged.

"email": "1stwestsupport@example.com"

UpdateRequest provides the input to as Update request.

Variables

View Source
var ExpectedRegionsSlice = []regions.Region{FirstRegion, SecondRegion}

ExpectedRegionsSlice is the slice of regions expected to be returned from ListOutput.

View Source
var FirstRegion = regions.Region{
	ID: "RegionOne-East",
	Links: map[string]interface{}{
		"self": "http://example.com/identity/v3/regions/RegionOne-East",
	},
	Description:    "East sub-region of RegionOne",
	Extra:          map[string]interface{}{},
	ParentRegionID: "RegionOne",
}

FirstRegion is the first region in the List request.

View Source
var SecondRegion = regions.Region{
	ID: "RegionOne-West",
	Links: map[string]interface{}{
		"self": "https://example.com/identity/v3/regions/RegionOne-West",
	},
	Description: "West sub-region of RegionOne",
	Extra: map[string]interface{}{
		"email": "westsupport@example.com",
	},
	ParentRegionID: "RegionOne",
}

SecondRegion is the second region in the List request.

View Source
var SecondRegionUpdated = regions.Region{
	ID: "RegionOne-West",
	Links: map[string]interface{}{
		"self": "https://example.com/identity/v3/regions/RegionOne-West",
	},
	Description: "First West sub-region of RegionOne",
	Extra: map[string]interface{}{
		"email": "westsupport@example.com",
	},
	ParentRegionID: "RegionOne",
}
// Due to a bug in Keystone, the Extra column of the Region table
// is not updatable, see: https://bugs.launchpad.net/keystone/+bug/1729933
// This should replace the email in SecondRegionUpdated.Extra once the fix
// is merged.

"email": "1stwestsupport@example.com"

SecondRegionUpdated is the second region in the List request.

Functions

func HandleCreateRegionSuccessfully

func HandleCreateRegionSuccessfully(t *testing.T)

HandleCreateRegionSuccessfully creates an HTTP handler at `/regions` on the test handler mux that tests region creation.

func HandleDeleteRegionSuccessfully

func HandleDeleteRegionSuccessfully(t *testing.T)

HandleDeleteRegionSuccessfully creates an HTTP handler at `/regions` on the test handler mux that tests region deletion.

func HandleGetRegionSuccessfully

func HandleGetRegionSuccessfully(t *testing.T)

HandleGetRegionSuccessfully creates an HTTP handler at `/regions` on the test handler mux that responds with a single region.

func HandleListRegionsSuccessfully

func HandleListRegionsSuccessfully(t *testing.T)

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

func HandleUpdateRegionSuccessfully

func HandleUpdateRegionSuccessfully(t *testing.T)

HandleUpdateRegionSuccessfully creates an HTTP handler at `/regions` on the test handler mux that tests region update.

Types

This section is empty.

Jump to

Keyboard shortcuts

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