Documentation ¶
Index ¶
- Constants
- Variables
- func HandleCreateProjectSuccessfully(t *testing.T)
- func HandleDeleteProjectSuccessfully(t *testing.T)
- func HandleGetProjectSuccessfully(t *testing.T)
- func HandleListAvailableProjectsSuccessfully(t *testing.T)
- func HandleListProjectsSuccessfully(t *testing.T)
- func HandleUpdateProjectSuccessfully(t *testing.T)
Constants ¶
const CreateRequest = `` /* 130-byte string literal not displayed */
CreateRequest provides the input to a Create request.
const GetOutput = `` /* 233-byte string literal not displayed */
GetOutput provides a Get result.
const ListAvailableOutput = `` /* 699-byte string literal not displayed */
ListAvailableOutput provides a single page of available Project results.
const ListOutput = `` /* 607-byte string literal not displayed */
ListOutput provides a single page of Project results.
const UpdateOutput = `` /* 239-byte string literal not displayed */
UpdateOutput provides an Update response.
const UpdateRequest = `` /* 136-byte string literal not displayed */
UpdateRequest provides the input to an Update request.
Variables ¶
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.
var ExpectedAvailableProjectsSlice = []projects.Project{FirstProject, SecondProject}
ExpectedAvailableProjectsSlice is the slice of projects expected to be returned from ListAvailableOutput.
var ExpectedProjectSlice = []projects.Project{RedTeam, BlueTeam}
ExpectedProjectSlice is the slice of projects expected to be returned from ListOutput.
var FirstProject = projects.Project{ Description: "my first project", DomainID: "11111", Enabled: true, ID: "abcde", Name: "project 1", ParentID: "11111", Extra: map[string]interface{}{ "links": map[string]interface{}{"self": "http://localhost:5000/identity/v3/projects/abcde"}, }, }
FirstProject is a Project fixture.
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.
var SecondProject = projects.Project{ Description: "my second project", DomainID: "22222", Enabled: true, ID: "bcdef", Name: "project 2", ParentID: "22222", Extra: map[string]interface{}{ "links": map[string]interface{}{"self": "http://localhost:5000/identity/v3/projects/bcdef"}, }, }
SecondProject is a Project fixture.
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 ¶
HandleCreateProjectSuccessfully creates an HTTP handler at `/projects` on the test handler mux that tests project creation.
func HandleDeleteProjectSuccessfully ¶
HandleDeleteProjectSuccessfully creates an HTTP handler at `/projects` on the test handler mux that tests project deletion.
func HandleGetProjectSuccessfully ¶
HandleGetProjectSuccessfully creates an HTTP handler at `/projects` on the test handler mux that responds with a single project.
func HandleListAvailableProjectsSuccessfully ¶
HandleListAvailableProjectsSuccessfully creates an HTTP handler at `/auth/projects` on the test handler mux that responds with a list of two tenants.
func HandleListProjectsSuccessfully ¶
HandleListProjectsSuccessfully creates an HTTP handler at `/projects` on the test handler mux that responds with a list of two tenants.
func HandleUpdateProjectSuccessfully ¶
HandleUpdateProjectSuccessfully creates an HTTP handler at `/projects` on the test handler mux that tests project updates.
Types ¶
This section is empty.