testing

package
v0.0.0-...-d5be3fe Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const FindOutput = `` /* 885-byte string literal not displayed */

FindOutput represents the response body from a Find request.

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

GetOutput represents the response body from a Get request.

View Source
const GetSchemaOutput = `` /* 429-byte string literal not displayed */

GetSchemaOutput represents the response body from a Schema request.

View Source
const GetTemplateOutput = `` /* 1270-byte string literal not displayed */

GetTemplateOutput represents the response body from a Template request.

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

ListOutput represents the response body from a List request.

View Source
const ListTypesOutput = `` /* 266-byte string literal not displayed */

ListTypesOutput represents the response body from a ListTypes request.

View Source
const MetadataOutput = `
{
    "metadata": {
      "number": "7",
      "animal": "auk"
    }
}`

MetadataOutput represents the response body from a Metadata request.

Variables

View Source
var FindExpected = []stackresources.Resource{
	{
		Name: "hello_world",
		Links: []gophercloud.Link{
			{
				Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/postman_stack/5f57cff9-93fc-424e-9f78-df0515e7f48b/resources/hello_world",
				Rel:  "self",
			},
			{
				Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/postman_stack/5f57cff9-93fc-424e-9f78-df0515e7f48b",
				Rel:  "stack",
			},
		},
		LogicalID:    "hello_world",
		StatusReason: "state changed",
		UpdatedTime:  gophercloud.JSONRFC3339NoZ(time.Date(2015, 2, 5, 21, 33, 11, 0, time.UTC)),
		CreationTime: gophercloud.JSONRFC3339NoZ(time.Date(2015, 2, 5, 21, 33, 10, 0, time.UTC)),
		RequiredBy:   []interface{}{},
		Status:       "CREATE_IN_PROGRESS",
		PhysicalID:   "49181cd6-169a-4130-9455-31185bbfc5bf",
		Type:         "OS::Nova::Server",
		Attributes:   map[string]interface{}{"SXSW": "atx"},
		Description:  "Some resource",
	},
}

FindExpected represents the expected object from a Find request.

View Source
var GetExpected = &stackresources.Resource{
	Name: "wordpress_instance",
	Links: []gophercloud.Link{
		{
			Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/teststack/0b1771bd-9336-4f2b-ae86-a80f971faf1e/resources/wordpress_instance",
			Rel:  "self",
		},
		{
			Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/teststack/0b1771bd-9336-4f2b-ae86-a80f971faf1e",
			Rel:  "stack",
		},
	},
	LogicalID:    "wordpress_instance",
	Attributes:   map[string]interface{}{"SXSW": "atx"},
	StatusReason: "state changed",
	UpdatedTime:  gophercloud.JSONRFC3339NoZ(time.Date(2014, 12, 10, 18, 34, 35, 0, time.UTC)),
	RequiredBy:   []interface{}{},
	Status:       "CREATE_COMPLETE",
	PhysicalID:   "00e3a2fe-c65d-403c-9483-4db9930dd194",
	Type:         "OS::Nova::Server",
}

GetExpected represents the expected object from a Get request.

View Source
var GetSchemaExpected = &stackresources.TypeSchema{
	Attributes: map[string]interface{}{
		"an_attribute": map[string]interface{}{
			"description": "An attribute description .",
		},
	},
	Properties: map[string]interface{}{
		"a_property": map[string]interface{}{
			"update_allowed": false,
			"required":       true,
			"type":           "string",
			"description":    "A resource description.",
		},
	},
	ResourceType: "OS::Heat::AResourceName",
	SupportStatus: map[string]interface{}{
		"message": "A status message",
		"status":  "SUPPORTED",
		"version": "2014.1",
	},
}

GetSchemaExpected represents the expected object from a Schema request.

View Source
var GetTemplateExpected = "" /* 1448-byte string literal not displayed */

GetTemplateExpected represents the expected object from a Template request.

View Source
var ListExpected = []stackresources.Resource{
	{
		Name: "hello_world",
		Links: []gophercloud.Link{
			{
				Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/postman_stack/5f57cff9-93fc-424e-9f78-df0515e7f48b/resources/hello_world",
				Rel:  "self",
			},
			{
				Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/postman_stack/5f57cff9-93fc-424e-9f78-df0515e7f48b",
				Rel:  "stack",
			},
		},
		LogicalID:    "hello_world",
		StatusReason: "state changed",
		UpdatedTime:  gophercloud.JSONRFC3339NoZ(time.Date(2015, 2, 5, 21, 33, 11, 0, time.UTC)),
		CreationTime: gophercloud.JSONRFC3339NoZ(time.Date(2015, 2, 5, 21, 33, 10, 0, time.UTC)),
		RequiredBy:   []interface{}{},
		Status:       "CREATE_IN_PROGRESS",
		PhysicalID:   "49181cd6-169a-4130-9455-31185bbfc5bf",
		Type:         "OS::Nova::Server",
		Attributes:   map[string]interface{}{"SXSW": "atx"},
		Description:  "Some resource",
	},
}

ListExpected represents the expected object from a List request.

View Source
var ListTypesExpected = stackresources.ResourceTypes{
	"OS::Nova::Server",
	"OS::Heat::RandomString",
	"OS::Swift::Container",
	"OS::Trove::Instance",
	"OS::Nova::FloatingIPAssociation",
	"OS::Cinder::VolumeAttachment",
	"OS::Nova::FloatingIP",
	"OS::Nova::KeyPair",
}

ListTypesExpected represents the expected object from a ListTypes request.

View Source
var MetadataExpected = map[string]string{
	"number": "7",
	"animal": "auk",
}

MetadataExpected represents the expected object from a Metadata request.

View Source
var SortedListTypesExpected = stackresources.ResourceTypes{
	"OS::Cinder::VolumeAttachment",
	"OS::Heat::RandomString",
	"OS::Nova::FloatingIP",
	"OS::Nova::FloatingIPAssociation",
	"OS::Nova::KeyPair",
	"OS::Nova::Server",
	"OS::Swift::Container",
	"OS::Trove::Instance",
}

same as above, but sorted

Functions

func HandleFindSuccessfully

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

HandleFindSuccessfully creates an HTTP handler at `/stacks/hello_world/resources` on the test handler mux that responds with a `Find` response.

func HandleGetSchemaSuccessfully

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

HandleGetSchemaSuccessfully creates an HTTP handler at `/resource_types/OS::Heat::AResourceName` on the test handler mux that responds with a `Schema` response.

func HandleGetSuccessfully

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

HandleGetSuccessfully creates an HTTP handler at `/stacks/teststack/0b1771bd-9336-4f2b-ae86-a80f971faf1e/resources/wordpress_instance` on the test handler mux that responds with a `Get` response.

func HandleGetTemplateSuccessfully

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

HandleGetTemplateSuccessfully creates an HTTP handler at `/resource_types/OS::Heat::AResourceName/template` on the test handler mux that responds with a `Template` response.

func HandleListSuccessfully

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

HandleListSuccessfully creates an HTTP handler at `/stacks/hello_world/49181cd6-169a-4130-9455-31185bbfc5bf/resources` on the test handler mux that responds with a `List` response.

func HandleListTypesSuccessfully

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

HandleListTypesSuccessfully creates an HTTP handler at `/resource_types` on the test handler mux that responds with a `ListTypes` response.

func HandleMetadataSuccessfully

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

HandleMetadataSuccessfully creates an HTTP handler at `/stacks/teststack/0b1771bd-9336-4f2b-ae86-a80f971faf1e/resources/wordpress_instance/metadata` on the test handler mux that responds with a `Metadata` response.

Types

This section is empty.

Jump to

Keyboard shortcuts

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