testing

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

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

CreateRequest provides the input to a Create request.

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

GetOutput provides a Get result.

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

ListOutput provides a single page of Project results.

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

UpdateOutput provides an Update response.

View Source
const UpdateRequest = `` /* 136-byte string literal not displayed */

UpdateRequest provides the input to an Update request.

Variables

View Source
var BlueTeam = projects.Project{
	IsDomain:    false,
	Description: "The team that is blue",
	DomainID:    "default",
	Enabled:     true,
	ID:          "9876",
	Name:        "Blue Team",
	ParentID:    "",
	Extra:       make(map[string]interface{}),
	Options: map[projects.Option]interface{}{
		projects.Immutable: true,
	},
}

BlueTeam is a Project fixture.

View Source
var ExpectedProjectSlice = []projects.Project{RedTeam, BlueTeam}

ExpectedProjectSlice is the slice of projects expected to be returned from ListOutput.

View Source
var RedTeam = projects.Project{
	IsDomain:    false,
	Description: "The team that is red",
	DomainID:    "default",
	Enabled:     true,
	ID:          "1234",
	Name:        "Red Team",
	ParentID:    "",
	Tags:        []string{"Red", "Team"},
	Extra:       map[string]interface{}{"test": "old"},
}

RedTeam is a Project fixture.

View Source
var UpdatedRedTeam = projects.Project{
	IsDomain:    false,
	Description: "The team that is bright red",
	DomainID:    "default",
	Enabled:     true,
	ID:          "1234",
	Name:        "Bright Red Team",
	ParentID:    "",
	Tags:        []string{"Red"},
	Extra:       map[string]interface{}{"test": "new"},
}

UpdatedRedTeam is a Project Fixture.

Functions

func HandleCreateProjectSuccessfully

func HandleCreateProjectSuccessfully(t *testing.T)

HandleCreateProjectSuccessfully creates an HTTP handler at `/projects` on the test handler mux that tests project creation.

func HandleDeleteProjectSuccessfully

func HandleDeleteProjectSuccessfully(t *testing.T)

HandleDeleteProjectSuccessfully creates an HTTP handler at `/projects` on the test handler mux that tests project deletion.

func HandleGetProjectSuccessfully

func HandleGetProjectSuccessfully(t *testing.T)

HandleGetProjectSuccessfully creates an HTTP handler at `/projects` on the test handler mux that responds with a single project.

func HandleListProjectsSuccessfully

func HandleListProjectsSuccessfully(t *testing.T)

HandleListProjectsSuccessfully creates an HTTP handler at `/projects` on the test handler mux that responds with a list of two tenants.

func HandleUpdateProjectSuccessfully

func HandleUpdateProjectSuccessfully(t *testing.T)

HandleUpdateProjectSuccessfully creates an HTTP handler at `/projects` on the test handler mux that tests project updates.

Types

This section is empty.

Jump to

Keyboard shortcuts

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