testing

package
v0.13.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

CreateRequest provides the input to a Create request.

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

GetOutput provides a Get result.

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

ListOutput provides a single page of Credential results.

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

UpdateOutput provides an update result.

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

UpdateRequest provides the input to as Update request.

Variables

View Source
var Credential = credentials.Credential{
	ID:        credentialID,
	ProjectID: projectID,
	Type:      "ec2",
	UserID:    userID,
	Blob:      "{\"access\":\"181920\",\"secret\":\"secretKey\"}",
	Links: map[string]interface{}{
		"self": "http://identity/v3/credentials/3d3367228f9c7665266604462ec60029bcd83ad89614021a80b2eb879c572510",
	},
}

ExpectedCredentialsSlice is the slice of credentials expected to be returned from ListOutput.

View Source
var FirstCredential = credentials.Credential{
	ID:        credentialID,
	ProjectID: projectID,
	Type:      "ec2",
	UserID:    userID,
	Blob:      "{\"access\":\"181920\",\"secret\":\"secretKey\"}",
	Links: map[string]interface{}{
		"self": "http://identity/v3/credentials/3d3367228f9c7665266604462ec60029bcd83ad89614021a80b2eb879c572510",
	},
}
View Source
var SecondCredential = credentials.Credential{
	ID:        "2441494e52ab6d594a34d74586075cb299489bdd1e9389e3ab06467a4f460609",
	ProjectID: "1a1d14690f3c4ec5bf5f321c5fde3c16",
	Type:      "ec2",
	UserID:    "6f556708d04b4ea6bc72d7df2296b71a",
	Blob:      "{\"access\":\"7da79ff0aa364e1396f067e352b9b79a\",\"secret\":\"7a18d68ba8834b799d396f3ff6f1e98c\"}",
	Links: map[string]interface{}{
		"self": "http://identity/v3/credentials/2441494e52ab6d594a34d74586075cb299489bdd1e9389e3ab06467a4f460609",
	},
}
View Source
var SecondCredentialUpdated = credentials.Credential{
	ID:        "2441494e52ab6d594a34d74586075cb299489bdd1e9389e3ab06467a4f460609",
	ProjectID: projectID,
	Type:      "ec2",
	UserID:    userID,
	Blob:      "{\"access\":\"181920\",\"secret\":\"secretKey\"}",
	Links: map[string]interface{}{
		"self": "http://identity/v3/credentials/2441494e52ab6d594a34d74586075cb299489bdd1e9389e3ab06467a4f460609",
	},
}

SecondCredentialUpdated is how SecondCredential should look after an Update.

Functions

func HandleCreateCredentialSuccessfully

func HandleCreateCredentialSuccessfully(t *testing.T)

HandleCreateCredentialSuccessfully creates an HTTP handler at `/credentials` on the test handler mux that tests credential creation.

func HandleDeleteCredentialSuccessfully

func HandleDeleteCredentialSuccessfully(t *testing.T)

HandleDeleteCredentialSuccessfully creates an HTTP handler at `/credentials` on the test handler mux that tests credential deletion.

func HandleGetCredentialSuccessfully

func HandleGetCredentialSuccessfully(t *testing.T)

HandleGetCredentialSuccessfully creates an HTTP handler at `/credentials` on the test handler mux that responds with a single credential.

func HandleListCredentialsSuccessfully

func HandleListCredentialsSuccessfully(t *testing.T)

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

func HandleUpdateCredentialSuccessfully

func HandleUpdateCredentialSuccessfully(t *testing.T)

HandleUpdateCredentialsSuccessfully creates an HTTP handler at `/credentials` on the test handler mux that tests credentials update.

Types

This section is empty.

Jump to

Keyboard shortcuts

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