testing

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

CreateRequest provides the input to a Create request.

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

GetOutput provides a Get result.

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

ListOutput provides a single page of Group results.

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

UpdateOutput provides an update result.

View Source
const UpdateRequest = `
{
    "group": {
        "description": "L2 Support Team",
        "email": "supportteam@example.com"
    }
}
`

UpdateRequest provides the input to as Update request.

Variables

View Source
var ExpectedGroupsSlice = []groups.Group{FirstGroup, SecondGroup}

ExpectedGroupsSlice is the slice of groups expected to be returned from ListOutput.

View Source
var FirstGroup = groups.Group{
	DomainID: "default",
	ID:       "2844b2a08be147a08ef58317d6471f1f",
	Links: map[string]interface{}{
		"self": "http://example.com/identity/v3/groups/2844b2a08be147a08ef58317d6471f1f",
	},
	Name:        "internal support",
	Description: "group for internal support users",
	Extra: map[string]interface{}{
		"email": "support@localhost",
	},
}

FirstGroup is the first group in the List request.

View Source
var SecondGroup = groups.Group{
	DomainID: "1789d1",
	ID:       "9fe1d3",
	Links: map[string]interface{}{
		"self": "https://example.com/identity/v3/groups/9fe1d3",
	},
	Name:        "support",
	Description: "group for support users",
	Extra: map[string]interface{}{
		"email": "support@example.com",
	},
}

SecondGroup is the second group in the List request.

View Source
var SecondGroupUpdated = groups.Group{
	DomainID: "1789d1",
	ID:       "9fe1d3",
	Links: map[string]interface{}{
		"self": "https://example.com/identity/v3/groups/9fe1d3",
	},
	Name:        "support",
	Description: "L2 Support Team",
	Extra: map[string]interface{}{
		"email": "supportteam@example.com",
	},
}

SecondGroupUpdated is how SecondGroup should look after an Update.

Functions

func HandleCreateGroupSuccessfully

func HandleCreateGroupSuccessfully(t *testing.T)

HandleCreateGroupSuccessfully creates an HTTP handler at `/groups` on the test handler mux that tests group creation.

func HandleDeleteGroupSuccessfully

func HandleDeleteGroupSuccessfully(t *testing.T)

HandleDeleteGroupSuccessfully creates an HTTP handler at `/groups` on the test handler mux that tests group deletion.

func HandleGetGroupSuccessfully

func HandleGetGroupSuccessfully(t *testing.T)

HandleGetGroupSuccessfully creates an HTTP handler at `/groups` on the test handler mux that responds with a single group.

func HandleListGroupsSuccessfully

func HandleListGroupsSuccessfully(t *testing.T)

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

func HandleUpdateGroupSuccessfully

func HandleUpdateGroupSuccessfully(t *testing.T)

HandleUpdateGroupSuccessfully creates an HTTP handler at `/groups` on the test handler mux that tests group update.

Types

This section is empty.

Jump to

Keyboard shortcuts

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