test

package
v0.0.0-...-2b1a09b Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const CreateRequest = `
{
    "domain": {
        "name": "domain two"
    }
}
`

CreateRequest provides the input to a Create request.

View Source
const CreateRoleRequest = `
{
    "role": {
        "name": "does_not_exist",
        "description": "some description"
    }
}
`

CreateRequest provides the input to a Create request.

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

GetOutput provides a Get result.

View Source
const GetRoleOutput = `` /* 286-byte string literal not displayed */

GetOutput provides a Get result.

View Source
const GetServiceOutput = `` /* 350-byte string literal not displayed */

GetOutput provides a Get result.

View Source
const ListAssignmentOutput = `` /* 1086-byte string literal not displayed */

ListAssignmentOutput provides a result of ListAssignment request.

View Source
const ListEmptyRoleOutput = `
{
    "roles": []
}
`
View Source
const ListOutput = `` /* 322-byte string literal not displayed */

ListOutput provides a single page of Domain results.

View Source
const ListRoleOutput = `` /* 827-byte string literal not displayed */

ListOutput provides a single page of Role results.

View Source
const ListServiceOutput = `` /* 436-byte string literal not displayed */

ListOutput provides a single page of Service results.

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

UpdateOutput provides an update result.

View Source
const UpdateRequest = `` /* 130-byte string literal not displayed */

UpdateRequest provides the input to as Update request.

View Source
const UpdateRoleOutput = `` /* 209-byte string literal not displayed */

UpdateOutput provides an update result.

View Source
const UpdateRoleRequest = `
{
    "role": {
		"name": "some_role",
        "description": "new description"
    }
}
`

UpdateRequest provides the input to as Update request.

View Source
const UpdateServiceOutput = `` /* 148-byte string literal not displayed */

UpdateOutput provides an update result.

View Source
const UpdateServiceRequest = `
{
    "service": {
        "type": "compute",
        "description": "Service New"
    }
}
`

UpdateRequest provides the input to as Update request.

Variables

View Source
var DomainUpdated = domains.Domain{
	Enabled:     true,
	ID:          "9fe1d3",
	Name:        "domain two",
	Description: "Staging Domain",
}

SecondDomainUpdated is how SecondDomain should look after an Update.

View Source
var FirstRole = roles.Role{
	DomainID: "default",
	ID:       "2844b2a08be147a08ef58317d6471f1f",
	Links: map[string]interface{}{
		"self": "http://example.com/identity/v3/roles/2844b2a08be147a08ef58317d6471f1f",
	},
	Name:  "admin-read-only",
	Extra: map[string]interface{}{},
}

FirstRole is the first role in the List request.

Functions

func HandleCreateDomainSuccessfully

func HandleCreateDomainSuccessfully(t *testing.T)

HandleCreateDomainSuccessfully creates an HTTP handler at `/domains` on the test handler mux that tests domain creation.

func HandleCreateServiceSuccessfully

func HandleCreateServiceSuccessfully(t *testing.T)

HandleCreateServiceSuccessfully creates an HTTP handler at `/services` on the test handler mux that tests service creation.

func HandleListAndCreateRolesSuccessfully

func HandleListAndCreateRolesSuccessfully(t *testing.T)

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

func HandleListDomainsSuccessfully

func HandleListDomainsSuccessfully(t *testing.T)

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

func HandleListServicesSuccessfully

func HandleListServicesSuccessfully(t *testing.T)

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

func HandleUpdateDomainSuccessfully

func HandleUpdateDomainSuccessfully(t *testing.T)

HandleUpdateDomainSuccessfully creates an HTTP handler at `/domains` on the test handler mux that tests domain update.

func HandleUpdateRoleSuccessfully

func HandleUpdateRoleSuccessfully(t *testing.T)

HandleUpdateRoleSuccessfully creates an HTTP handler at `/roles` on the test handler mux that tests role update.

func HandleUpdateServiceSuccessfully

func HandleUpdateServiceSuccessfully(t *testing.T)

HandleUpdateServiceSuccessfully creates an HTTP handler at `/services` on the test handler mux that tests service update.

Types

This section is empty.

Jump to

Keyboard shortcuts

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