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

testing

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

trusts unit tests

Index

Constants

View Source
const CreateRequest = `` /* 421-byte string literal not displayed */
View Source
const CreateResponse = `` /* 713-byte string literal not displayed */
View Source
const GetResponse = `` /* 762-byte string literal not displayed */

GetOutput provides a Get result.

View Source
const ListResponse = `` /* 723-byte string literal not displayed */

ListOutput provides a single page of Role results.

Variables

View Source
var ExpectedTrustsSlice = []trusts.Trust{FirstTrust, SecondTrust}

ExpectedRolesSlice is the slice of roles expected to be returned from ListOutput.

View Source
var FirstTrust = trusts.Trust{
	ID:            "1ff900",
	Impersonation: true,
	TrusteeUserID: "86c0d5",
	TrustorUserID: "a0fdfd",
	ProjectID:     "0f1233",
	ExpiresAt:     time.Date(2013, 02, 27, 18, 30, 59, 999999000, time.UTC),
	DeletedAt:     time.Time{},
}
View Source
var SecondTrust = trusts.Trust{
	ID:            "f4513a",
	Impersonation: false,
	TrusteeUserID: "86c0d5",
	TrustorUserID: "3cd2ce",
	ProjectID:     "0f1233",
	ExpiresAt:     time.Time{},
	DeletedAt:     time.Time{},
}

Functions

func HandleCreateTokenWithTrustID

func HandleCreateTokenWithTrustID(t *testing.T, options tokens.AuthOptionsBuilder, requestJSON string)

HandleCreateTokenWithTrustID verifies that providing certain AuthOptions and Scope results in an expected JSON structure.

func HandleCreateTrust added in v0.3.0

func HandleCreateTrust(t *testing.T)

HandleCreateTrust creates an HTTP handler at `/OS-TRUST/trusts` on the test handler mux that tests trust creation.

func HandleDeleteTrust added in v0.3.0

func HandleDeleteTrust(t *testing.T)

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

func HandleGetTrustSuccessfully added in v0.9.0

func HandleGetTrustSuccessfully(t *testing.T)

HandleGetTrustSuccessfully creates an HTTP handler at `/OS-TRUST/trusts` on the test handler mux that responds with a single trusts.

func HandleListTrustsSuccessfully added in v0.9.0

func HandleListTrustsSuccessfully(t *testing.T)

HandleListTrustsSuccessfully creates an HTTP handler at `/OS-TRUST/trusts` on the test handler mux that responds with a list of two trusts.

Types

This section is empty.

Jump to

Keyboard shortcuts

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