testing

package
v0.0.0-...-ae37572 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: Apache-2.0 Imports: 6 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 GetOutput = `` /* 204-byte string literal not displayed */

GetOutput provides a Get result.

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

ListOutput provides a single page of Domain results.

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

UpdateOutput provides an update result.

View Source
const UpdateRequest = `
{
    "domain": {
        "description": "Staging Domain"
    }
}
`

UpdateRequest provides the input to as Update request.

Variables

View Source
var ExpectedDomainsSlice = []domains.Domain{FirstDomain, SecondDomain}

ExpectedDomainsSlice is the slice of domains expected to be returned from ListOutput.

View Source
var FirstDomain = domains.Domain{
	Enabled: true,
	ID:      "2844b2a08be147a08ef58317d6471f1f",
	Links: map[string]interface{}{
		"self": "http://example.com/identity/v3/domains/2844b2a08be147a08ef58317d6471f1f",
	},
	Name:        "domain one",
	Description: "some description",
}

FirstDomain is the first domain in the List request.

View Source
var SecondDomain = domains.Domain{
	Enabled: true,
	ID:      "9fe1d3",
	Links: map[string]interface{}{
		"self": "https://example.com/identity/v3/domains/9fe1d3",
	},
	Name: "domain two",
}

SecondDomain is the second domain in the List request.

View Source
var SecondDomainUpdated = domains.Domain{
	Enabled: true,
	ID:      "9fe1d3",
	Links: map[string]interface{}{
		"self": "https://example.com/identity/v3/domains/9fe1d3",
	},
	Name:        "domain two",
	Description: "Staging Domain",
}

SecondDomainUpdated is how SecondDomain should look after an Update.

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 HandleDeleteDomainSuccessfully

func HandleDeleteDomainSuccessfully(t *testing.T)

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

func HandleGetDomainSuccessfully

func HandleGetDomainSuccessfully(t *testing.T)

HandleGetDomainSuccessfully creates an HTTP handler at `/domains` on the test handler mux that responds with a single domain.

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 HandleUpdateDomainSuccessfully

func HandleUpdateDomainSuccessfully(t *testing.T)

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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