Documentation ¶
Index ¶
- Constants
- Variables
- func HandleCreateConsumerSuccessfully(t *testing.T)
- func HandleCreateContainerSuccessfully(t *testing.T)
- func HandleDeleteConsumerSuccessfully(t *testing.T)
- func HandleDeleteContainerSuccessfully(t *testing.T)
- func HandleGetContainerSuccessfully(t *testing.T)
- func HandleListConsumersSuccessfully(t *testing.T)
- func HandleListContainersSuccessfully(t *testing.T)
Constants ¶
const CreateConsumerRequest = `
{
"URL": "http://example.com",
"name": "CONSUMER-LZILN1zq"
}`
const CreateConsumerResponse = `` /* 546-byte string literal not displayed */
const CreateRequest = `` /* 202-byte string literal not displayed */
CreateRequest provides the input to a Create request.
const CreateResponse = `` /* 461-byte string literal not displayed */
CreateResponse is the response of a Create request.
const DeleteConsumerRequest = `
{
"URL": "http://example.com",
"name": "CONSUMER-LZILN1zq"
}`
const GetResponse = `` /* 461-byte string literal not displayed */
GetResponse provides a Get result.
const ListConsumersResponse = `` /* 226-byte string literal not displayed */
const ListResponse = `` /* 1101-byte string literal not displayed */
ListResponse provides a single page of container results.
Variables ¶
var ExpectedConsumer = containers.Consumer{ URL: "http://example.com", Created: time.Date(2018, 6, 22, 16, 26, 25, 0, time.UTC), Name: "CONSUMER-LZILN1zq", Status: "ACTIVE", Updated: time.Date(2018, 6, 22, 16, 26, 25, 0, time.UTC), }
ExpectedConsumer is the expected result of a consumer retrieval.
var ExpectedConsumersSlice = []containers.Consumer{ExpectedConsumer}
ExpectedConsumersSlice is an expected slice of consumers.
var ExpectedContainersSlice = []containers.Container{FirstContainer, SecondContainer}
ExpectedContainersSlice is the slice of containers expected to be returned from ListResponse.
var ExpectedCreatedConsumer = containers.Container{ Consumers: []containers.ConsumerRef{ { Name: "CONSUMER-LZILN1zq", URL: "http://example.com", }, }, ContainerRef: "http://barbican:9311/v1/containers/dfdb88f3-4ddb-4525-9da6-066453caa9b0", Created: time.Date(2018, 6, 21, 21, 28, 37, 0, time.UTC), CreatorID: "5c70d99f4a8641c38f8084b32b5e5c0e", Name: "mycontainer", SecretRefs: []containers.SecretRef{ { Name: "mysecret", SecretRef: "http://barbican:9311/v1/secrets/1b8068c4-3bb6-4be6-8f1e-da0d1ea0b67c", }, }, Status: "ACTIVE", Type: "generic", Updated: time.Date(2018, 6, 21, 21, 28, 37, 0, time.UTC), }
ExpectedCreatedConsumer is the expected result of adding a consumer.
var FirstContainer = containers.Container{ Consumers: []containers.ConsumerRef{}, ContainerRef: "http://barbican:9311/v1/containers/dfdb88f3-4ddb-4525-9da6-066453caa9b0", Created: time.Date(2018, 6, 21, 21, 28, 37, 0, time.UTC), CreatorID: "5c70d99f4a8641c38f8084b32b5e5c0e", Name: "mycontainer", SecretRefs: []containers.SecretRef{ { Name: "mysecret", SecretRef: "http://barbican:9311/v1/secrets/1b8068c4-3bb6-4be6-8f1e-da0d1ea0b67c", }, }, Status: "ACTIVE", Type: "generic", Updated: time.Date(2018, 6, 21, 21, 28, 37, 0, time.UTC), }
FirstContainer is the first resource in the List request.
var SecondContainer = containers.Container{ Consumers: []containers.ConsumerRef{}, ContainerRef: "http://barbican:9311/v1/containers/47b20e73-335b-4867-82dc-3796524d5e20", Created: time.Date(2018, 6, 21, 21, 30, 9, 0, time.UTC), CreatorID: "5c70d99f4a8641c38f8084b32b5e5c0e", Name: "anothercontainer", SecretRefs: []containers.SecretRef{ { Name: "another", SecretRef: "http://barbican:9311/v1/secrets/1b12b69a-8822-442e-a303-da24ade648ac", }, }, Status: "ACTIVE", Type: "generic", Updated: time.Date(2018, 6, 21, 21, 30, 9, 0, time.UTC), }
SecondContainer is the second resource in the List request.
Functions ¶
func HandleCreateConsumerSuccessfully ¶
HandleCreateConsumerSuccessfully creates an HTTP handler at `/containers/uuid/consumers` on the test handler mux that tests resource creation.
func HandleCreateContainerSuccessfully ¶
HandleCreateContainerSuccessfully creates an HTTP handler at `/containers` on the test handler mux that tests resource creation.
func HandleDeleteConsumerSuccessfully ¶
HandleDeleteConsumerSuccessfully creates an HTTP handler at `/containers/uuid/consumers` on the test handler mux that tests resource deletion.
func HandleDeleteContainerSuccessfully ¶
HandleDeleteContainerSuccessfully creates an HTTP handler at `/containers` on the test handler mux that tests resource deletion.
func HandleGetContainerSuccessfully ¶
HandleGetContainerSuccessfully creates an HTTP handler at `/containers` on the test handler mux that responds with a single resource.
func HandleListConsumersSuccessfully ¶
HandleListConsumersSuccessfully creates an HTTP handler at `/containers/uuid/consumers` on the test handler mux that responds with a list of consumers.
func HandleListContainersSuccessfully ¶
HandleListContainersSuccessfully creates an HTTP handler at `/containers` on the test handler mux that responds with a list of two containers.
Types ¶
This section is empty.