Help us shape the future of Go! Take the 2026 Go Developer Survey

testing

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const CreateOutput = `` /* 930-byte string literal not displayed */
View Source
const CreateRequest = `` /* 799-byte string literal not displayed */
View Source
const ListOutput = `` /* 1221-byte string literal not displayed */

Variables

View Source
var ExpectedMappingsSlice = []federation.Mapping{MappingACME}

ExpectedMappingsSlice is the slice of mappings expected to be returned from ListOutput.

View Source
var MappingACME = federation.Mapping{
	ID: "ACME",
	Links: map[string]interface{}{
		"self": "http://example.com/identity/v3/OS-FEDERATION/mappings/ACME",
	},
	Rules: []federation.MappingRule{
		{
			Local: []federation.RuleLocal{
				{
					User: &federation.RuleUser{
						Name: "{0}",
					},
				},
				{
					Group: &federation.Group{
						ID: "0cd5e9",
					},
				},
			},
			Remote: []federation.RuleRemote{
				{
					Type: "UserName",
				},
				{
					Type: "orgPersonType",
					NotAnyOf: []string{
						"Contractor",
						"Guest",
					},
				},
			},
		},
	},
}

Functions

func HandleCreateMappingSuccessfully added in v1.2.0

func HandleCreateMappingSuccessfully(t *testing.T)

HandleCreateMappingSuccessfully creates an HTTP handler at `/mappings` on the test handler mux that tests mapping creation.

func HandleListMappingsSuccessfully

func HandleListMappingsSuccessfully(t *testing.T)

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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