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

testing

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const CreateOutput = `` /* 813-byte string literal not displayed */

CreateOutput represents the response body from a Create request.

View Source
const FullListOutput = `` /* 474-byte string literal not displayed */

FullListOutput represents the response body from a List request without a marker.

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

GetOutput represents the response body from a Get request.

Variables

View Source
var CreateExpected = &softwareconfig.SoftwareConfig{
	Inputs: []map[string]interface{}{{"type": "String", "name": "foo"},
		{"type": "String", "name": "bar"}},
	Group:   "script",
	Name:    "test-cong",
	Outputs: []map[string]interface{}{{"type": "String", "name": "result", "error_output": "false"}},
	Config:  "#!/bin/sh -x\necho \"Writing to /tmp/$bar\"\necho $foo > /tmp/$bar\necho -n \"The file /tmp/$bar contains cat /tmp/$bar for server $deploy_server_id during $deploy_action\" > $heat_outputs_path.result\necho \"Written to /tmp/$bar\"\necho \"Output to stderr\" 1>&2",
	Id:      "e0be7e37-a581-4b24-bfb1-df4f3048c090",
}

CreateExpected represents the expected object from a Create request.

View Source
var GetExpected = &softwareconfig.SoftwareConfig{
	Inputs: []map[string]interface{}{{"type": "String", "name": "foo"},
		{"type": "String", "name": "bar"}},
	Group:   "script",
	Name:    "test-cong",
	Outputs: []map[string]interface{}{{"type": "String", "name": "result", "error_output": "false"}},
	Config:  "#!/bin/sh -x\necho \"Writing to /tmp/$bar\"\necho $foo > /tmp/$bar\necho -n \"The file /tmp/$bar contains cat /tmp/$bar for server $deploy_server_id during $deploy_action\" > $heat_outputs_path.result\necho \"Written to /tmp/$bar\"\necho \"Output to stderr\" 1>&2",
	Id:      "e0be7e37-a581-4b24-bfb1-df4f3048c090",
}

GetExpected represents the expected object from a Get request.

View Source
var ListExpected = []softwareconfig.SoftwareConfig{
	{
		Group: "script",
		Name:  "test-cong",
		Id:    "e0be7e37-a581-4b24-bfb1-df4f3048c090",
	},
	{
		Group: "script",
		Name:  "test-cong1",
		Id:    "743a15f6-9a55-49fe-80bb-a9188f39fc07",
	},
	{
		Group: "script",
		Name:  "a-config-we5zpvyu7b5o",
		Id:    "a6ff3598-f2e0-4111-81b0-aa3e1cac2529",
	},
}

ListExpected represents the expected object from a List request.

Functions

func HandleCreateSuccessfully

func HandleCreateSuccessfully(t *testing.T, output string)

HandleCreateSuccessfully creates an HTTP handler at `/stacks` on the test handler mux that responds with a `Create` response.

func HandleDeleteSuccessfully

func HandleDeleteSuccessfully(t *testing.T)

HandleDeleteSuccessfully creates an HTTP handler at `/stacks/postman_stack/16ef0584-4458-41eb-87c8-0dc8d5f66c87` on the test handler mux that responds with a `Delete` response.

func HandleGetSuccessfully

func HandleGetSuccessfully(t *testing.T, output string)

HandleGetSuccessfully creates an HTTP handler at `/stacks/postman_stack/16ef0584-4458-41eb-87c8-0dc8d5f66c87` on the test handler mux that responds with a `Get` response.

func HandleListSuccessfully

func HandleListSuccessfully(t *testing.T, output string)

HandleListSuccessfully creates an HTTP handler at `/stacks` on the test handler mux that responds with a `List` response.

Types

This section is empty.

Jump to

Keyboard shortcuts

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