testing

package
v0.5.17 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CreateNoOptionsRequest = `` /* 182-byte string literal not displayed */

CreateNoOptionsRequest provides the input to a Create request with no Options.

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

CreateRequest provides the input to a Create request.

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

GetOutput provides a Get result.

View Source
const GetOutputNoOptions = `` /* 170-byte string literal not displayed */

GetOutputNoOptions provides a Get result of a user with no options.

View Source
const ListGroupsOutput = `` /* 822-byte string literal not displayed */

ListGroupsOutput provides a ListGroups result.

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

ListOutput provides a single page of User results.

View Source
const ListProjectsOutput = `` /* 847-byte string literal not displayed */

ListProjectsOutput provides a ListProjects result.

View Source
const UpdateExtendedOutput = `` /* 238-byte string literal not displayed */

UpdateExtendedOutput provides an update result.

View Source
const UpdateExtendedRequest = `
{
    "user": {
        "enabled": false,
        "email": "email@generic.otc"
    }
}
`

UpdateExtendedRequest provides the input to as Update request.

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

UpdateOutput provides an update result.

View Source
const UpdateRequest = `
{
    "user": {
        "enabled": false
    }
}
`

UpdateRequest provides the input to as Update request.

Variables

View Source
var ExpectedGroupsSlice = []groups.Group{FirstGroup, SecondGroup}
View Source
var ExpectedProjectsSlice = []projects.Project{FirstProject, SecondProject}
View Source
var ExpectedUsersSlice = []users.User{FirstUser, SecondUser}

ExpectedUsersSlice is the slice of users expected to be returned from ListOutput.

View Source
var FirstGroup = groups.Group{
	Description: "Developers cleared for work on all general projects",
	DomainID:    "1789d1",
	ID:          "ea167b",
	Links: map[string]interface{}{
		"self": "https://example.com/identity/v3/groups/ea167b",
	},
	Extra: map[string]interface{}{
		"building": "Hilltop A",
	},
	Name: "Developers",
}
View Source
var FirstProject = projects.Project{
	Description: "my first project",
	DomainID:    "11111",
	Enabled:     true,
	ID:          "abcde",
	Name:        "project 1",
	ParentID:    "11111",
}
View Source
var FirstUser = users.User{
	DomainID: "default",
	Enabled:  true,
	ID:       "2844b2a08be147a08ef58317d6471f1f",
	Name:     "glance",
}

FirstUser is the first user in the List request.

View Source
var SecondGroup = groups.Group{
	Description: "Developers cleared for work on secret projects",
	DomainID:    "1789d1",
	ID:          "a62db1",
	Links: map[string]interface{}{
		"self": "https://example.com/identity/v3/groups/a62db1",
	},
	Extra: map[string]interface{}{},
	Name:  "Secure Developers",
}
View Source
var SecondProject = projects.Project{
	Description: "my second project",
	DomainID:    "22222",
	Enabled:     true,
	ID:          "bcdef",
	Name:        "project 2",
	ParentID:    "22222",
}
View Source
var SecondUser = users.User{
	DefaultProjectID: "263fd9",
	DomainID:         "1789d1",
	Enabled:          true,
	ID:               "9fe1d3",
	Name:             "jsmith",
}

SecondUser is the second user in the List request.

View Source
var SecondUserNoOptions = users.User{
	DefaultProjectID: "263fd9",
	DomainID:         "1789d1",
	Enabled:          true,
	ID:               "9fe1d3",
	Name:             "jsmith",
}
View Source
var SecondUserUpdated = users.User{
	DefaultProjectID: "263fd9",
	DomainID:         "1789d1",
	Enabled:          false,
	ID:               "9fe1d3",
	Name:             "jsmith",
}

SecondUserUpdated is how SecondUser should look after an Update.

View Source
var ThirdUserUpdated = users.User{
	DefaultProjectID: "263fd9",
	DomainID:         "1789d1",
	Enabled:          false,
	ID:               "9fe1d3",
	Name:             "jsmith",
	Email:            "email@generic.otc",
}

SecondUserUpdated is how SecondUser should look after an Update.

Functions

func HandleCreateNoOptionsUserSuccessfully

func HandleCreateNoOptionsUserSuccessfully(t *testing.T)

HandleCreateNoOptionsUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that tests user creation.

func HandleCreateUserSuccessfully

func HandleCreateUserSuccessfully(t *testing.T)

HandleCreateUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that tests user creation.

func HandleDeleteUserSuccessfully

func HandleDeleteUserSuccessfully(t *testing.T)

HandleDeleteUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that tests user deletion.

func HandleExtendedUpdateUserSuccessfully added in v0.1.0

func HandleExtendedUpdateUserSuccessfully(t *testing.T)

HandleUpdateUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that tests user update.

func HandleGetUserSuccessfully

func HandleGetUserSuccessfully(t *testing.T)

HandleGetUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that responds with a single user.

func HandleListInGroupSuccessfully

func HandleListInGroupSuccessfully(t *testing.T)

HandleListInGroupSuccessfully creates an HTTP handler at /groups/{groupID}/users on the test handler mux that response with a list of two users

func HandleListUserGroupsSuccessfully

func HandleListUserGroupsSuccessfully(t *testing.T)

HandleListUserGroupsSuccessfully creates an HTTP handler at /users/{userID}/groups on the test handler mux that respons with a list of two groups

func HandleListUserProjectsSuccessfully

func HandleListUserProjectsSuccessfully(t *testing.T)

HandleListUserProjectsSuccessfully creates an HTTP handler at /users/{userID}/projects on the test handler mux that respons wit a list of two projects

func HandleListUsersSuccessfully

func HandleListUsersSuccessfully(t *testing.T)

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

func HandleUpdateUserSuccessfully

func HandleUpdateUserSuccessfully(t *testing.T)

HandleUpdateUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that tests user update.

Types

This section is empty.

Jump to

Keyboard shortcuts

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