testing

package
v1.1.16 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 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 ListAvailableOutput = `` /* 775-byte string literal not displayed */

ListAvailableOutput provides a single page of available domain results.

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 ExpectedAvailableDomainsSlice = []domains.Domain{TestDomain, ProdDomain}

ExpectedAvailableDomainsSlice is the slice of domains expected to be returned from ListAvailableOutput.

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 ProdDomain = domains.Domain{
	Enabled: true,
	ID:      "a720688fb87f4575a4c000d818061eae",
	Links: map[string]interface{}{
		"self": "https://example.com/v3/domains/a720688fb87f4575a4c000d818061eae",
	},
	Name:        "ProdDomain",
	Description: "Production domain",
}

ProdDomain is a domain fixture.

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.

View Source
var TestDomain = domains.Domain{
	Enabled: false,
	ID:      "52af04aec5f84182b06959d2775d2000",
	Links: map[string]interface{}{
		"self": "https://example.com/v3/domains/52af04aec5f84182b06959d2775d2000",
	},
	Name:        "TestDomain",
	Description: "Testing domain",
}

TestDomain is a domain fixture.

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 HandleListAvailableDomainsSuccessfully

func HandleListAvailableDomainsSuccessfully(t *testing.T)

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

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