testing

package
v4.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Tenant Connection unit tests

Index

Constants

View Source
const CreateAttachBaremetalServerRequest = `` /* 729-byte string literal not displayed */

CreateAttachBaremetalServerRequest provides the input to a Create request.

View Source
const CreateAttachBaremetalServerResponse = `` /* 836-byte string literal not displayed */

CreateAttachBaremetalServerResponse provides the output from a Create request.

View Source
const CreateAttachComputeServerRequest = `` /* 594-byte string literal not displayed */

CreateAttachComputeServerRequest provides the input to a Create request.

View Source
const CreateAttachComputeServerResponse = `` /* 786-byte string literal not displayed */

CreateAttachComputeServerResponse provides the output from a Create request.

View Source
const CreateAttachVnaRequest = `` /* 503-byte string literal not displayed */

CreateAttachVnaRequest provides the input to a Create request.

View Source
const CreateAttachVnaResponse = `` /* 777-byte string literal not displayed */

CreateAttachVnaResponse provides the output from a Create request.

View Source
const GetResult = `` /* 797-byte string literal not displayed */

GetResult provides a Get result.

View Source
const ListResult = `` /* 1579-byte string literal not displayed */

ListResult provides a single page of tenant_connection results.

View Source
const UpdateBlankRequest = `
{
  "tenant_connection": {
    "name": "",
    "description": "",
    "tags": {}
  }
}
`

UpdateBlankRequest provides the input to as Update with blank request.

View Source
const UpdateBlankResult = `` /* 793-byte string literal not displayed */

UpdateBlankResult provides an update with blank result.

View Source
const UpdateNilRequest = `
{
  "tenant_connection": {
	"name": "nilupdate"
  }
}
`

UpdateNilRequest provides the input to as Update with nil request.

View Source
const UpdateNilResult = `` /* 848-byte string literal not displayed */

UpdateNilResult provides an update with blank with nil result.

View Source
const UpdateOtherMetadataRequest = `` /* 176-byte string literal not displayed */

UpdateOtherMetadataRequest provides the input to as Update to other metadata request.

View Source
const UpdateOtherMetadataResult = `` /* 850-byte string literal not displayed */

UpdateOtherMetadataResult provides an update to other metadata result.

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

UpdateRequest provides the input to as Update request.

View Source
const UpdateResult = `` /* 852-byte string literal not displayed */

UpdateResult provides an update result.

Variables

View Source
var CreateTenantConnectionAttachBaremetalServer = tenant_connections.TenantConnection{
	ID:                        "0d956a2e-4958-11ea-8088-525400060300",
	TenantConnectionRequestID: "147c4ffa-481e-11ea-8088-525400060300",
	Name:                      "attach_bare_name",
	Description:               "attach_bare_desc",
	Tags: map[string]string{
		"test_tags1": "test1",
	},
	TenantID:          "7e91b19b9baa423793ee74a8e1ff2be1",
	NameOther:         "",
	DescriptionOther:  "",
	TagsOther:         "{}",
	TenantIDOther:     "c7f3a68a73e845d4ba6a42fb80fce03f",
	NetworkID:         "061dbaa9-a3e0-4343-b3fc-0a619db66854",
	DeviceType:        "ECL::Baremetal::Server",
	DeviceID:          "0acab22f-8993-451c-8a6b-398b0244f578",
	DeviceInterfaceID: "46eb7624-d462-46c2-8ac7-f988a15d3280",
	PortID:            "87449d66-4e99-4cf7-9b93-9f153548ccc7",
	Status:            "creating",
}

CreateTenantConnectionAttachBaremetalServer is the tenant_connection in the Create Attach Baremetal Server request.

View Source
var CreateTenantConnectionAttachVna = tenant_connections.TenantConnection{
	ID:                        "f6331886-3804-11ea-95a8-525400060400",
	TenantConnectionRequestID: "67d76b00-3804-11ea-8088-525400060300",
	Name:                      "attach_vna_name",
	Description:               "attach_vna_desc",
	Tags: map[string]string{
		"test_tags1": "test1",
	},
	TenantID:          "7e91b19b9baa423793ee74a8e1ff2be1",
	NameOther:         "",
	DescriptionOther:  "",
	TagsOther:         "{}",
	TenantIDOther:     "c7f3a68a73e845d4ba6a42fb80fce03f",
	NetworkID:         "061dbaa9-a3e0-4343-b3fc-0a619db66854",
	DeviceType:        "ECL::VirtualNetworkAppliance::VSRX",
	DeviceID:          "c291f4c4-a680-4db0-8b88-7e579f0aaa37",
	DeviceInterfaceID: "interface_2",
	PortID:            "",
	Status:            "active",
}

CreateTenantConnectionAttachVna is the tenant_connection in the Create Attach Vna request.

ExpectedTenantConnectionsSlice is the slice of tenant_connection expected to be returned from ListResult.

View Source
var FirstTenantConnection = tenant_connections.TenantConnection{
	ID:                        "2a23e5a6-bd34-11e7-afb6-0050569c850d",
	TenantConnectionRequestID: "5fbcc350-bd33-11e7-afb6-0050569c850d",
	Name:                      "test_name_1",
	Description:               "test_desc_1",
	Tags: map[string]string{
		"test_tags1": "test1",
	},
	TenantID:          "7e91b19b9baa423793ee74a8e1ff2be1",
	NameOther:         "",
	DescriptionOther:  "",
	TagsOther:         map[string]string{},
	TenantIDOther:     "c7f3a68a73e845d4ba6a42fb80fce03f",
	NetworkID:         "77cfc6b0-d032-4e5a-b6fb-4cce2537f4d1",
	DeviceType:        "ECL::Compute::Server",
	DeviceID:          "8c235a3b-8dee-41a1-b81a-64e06edc0986",
	DeviceInterfaceID: "",
	PortID:            "b404ed73-9438-41a1-91ed-49d0e403be64",
	Status:            "creating",
}

FirstTenantConnection is the first tenant_connection in the List request.

View Source
var SecondTenantConnection = tenant_connections.TenantConnection{
	ID:                        "ea5d975c-bd31-11e7-bcac-0050569c850d",
	TenantConnectionRequestID: "90381138-b572-11e7-9391-0050569c850d",
	Name:                      "test_name_2",
	Description:               "test_desc_2",
	Tags: map[string]string{
		"test_tags2": "test2",
	},
	TenantID:         "c7f3a68a73e845d4ba6a42fb80fce03f",
	NameOther:        "test_name_other_2",
	DescriptionOther: "test_desc_other_2",
	TagsOther: map[string]string{
		"test_tags_other2": "test2",
	},
	TenantIDOther:     "7e91b19b9baa423793ee74a8e1ff2be1",
	NetworkID:         "c4d5fc41-b7e8-4f19-96f4-85299e54373c",
	DeviceType:        "ECL::Compute::Server",
	DeviceID:          "7cc34d4b-a345-4e51-b3d9-62540faca7bf",
	DeviceInterfaceID: "",
	PortID:            "c9c3de44-0720-4acd-87c1-9c76f0f77cac",
	Status:            "down",
}

SecondTenantConnection is the second tenant_connection in the List request.

View Source
var SecondTenantConnectionBlankUpdated = tenant_connections.TenantConnection{
	ID:                        "ea5d975c-bd31-11e7-bcac-0050569c850d",
	TenantConnectionRequestID: "90381138-b572-11e7-9391-0050569c850d",
	Name:                      "",
	Description:               "",
	Tags:                      map[string]string{},
	TenantID:                  "c7f3a68a73e845d4ba6a42fb80fce03f",
	NameOther:                 "test_name_other_2",
	DescriptionOther:          "test_desc_other_2",
	TagsOther:                 map[string]string{"test_tags_other2": "test2"},
	TenantIDOther:             "7e91b19b9baa423793ee74a8e1ff2be1",
	NetworkID:                 "c4d5fc41-b7e8-4f19-96f4-85299e54373c",
	DeviceType:                "ECL::Compute::Server",
	DeviceID:                  "7cc34d4b-a345-4e51-b3d9-62540faca7bf",
	DeviceInterfaceID:         "",
	PortID:                    "c9c3de44-0720-4acd-87c1-9c76f0f77cac",
	Status:                    "down",
}

SecondTenantConnectionBlankUpdated is how second tenant_connection should look after an Update with blank.

View Source
var SecondTenantConnectionNilUpdated = tenant_connections.TenantConnection{
	ID:                        "ea5d975c-bd31-11e7-bcac-0050569c850d",
	TenantConnectionRequestID: "90381138-b572-11e7-9391-0050569c850d",
	Name:                      "nilupdate",
	Description:               "test_desc_2",
	Tags: map[string]string{
		"test_tags2": "test2",
	},
	TenantID:         "c7f3a68a73e845d4ba6a42fb80fce03f",
	NameOther:        "test_name_other_2",
	DescriptionOther: "test_desc_other_2",
	TagsOther: map[string]string{
		"test_tags_other2": "test2",
	},
	TenantIDOther:     "7e91b19b9baa423793ee74a8e1ff2be1",
	NetworkID:         "c4d5fc41-b7e8-4f19-96f4-85299e54373c",
	DeviceType:        "ECL::Compute::Server",
	DeviceID:          "7cc34d4b-a345-4e51-b3d9-62540faca7bf",
	DeviceInterfaceID: "",
	PortID:            "c9c3de44-0720-4acd-87c1-9c76f0f77cac",
	Status:            "down",
}

SecondTenantConnectionNilUpdated is how second tenant_connection should look after an Update with nil.

View Source
var SecondTenantConnectionOtherMetadataUpdated = tenant_connections.TenantConnection{
	ID:                        "ea5d975c-bd31-11e7-bcac-0050569c850d",
	TenantConnectionRequestID: "90381138-b572-11e7-9391-0050569c850d",
	Name:                      "test_name_2",
	Description:               "test_desc_2",
	Tags: map[string]string{
		"test_tags2": "test2",
	},
	TenantID:         "c7f3a68a73e845d4ba6a42fb80fce03f",
	NameOther:        "update_name_other",
	DescriptionOther: "update_desc_other",
	TagsOther: map[string]string{
		"test_tags_other": "update",
	},
	TenantIDOther:     "7e91b19b9baa423793ee74a8e1ff2be1",
	NetworkID:         "c4d5fc41-b7e8-4f19-96f4-85299e54373c",
	DeviceType:        "ECL::Compute::Server",
	DeviceID:          "7cc34d4b-a345-4e51-b3d9-62540faca7bf",
	DeviceInterfaceID: "",
	PortID:            "c9c3de44-0720-4acd-87c1-9c76f0f77cac",
	Status:            "down",
}

SecondTenantConnectionOtherMetadataUpdated is how second tenant_connection should look after an Update to other metadata.

View Source
var SecondTenantConnectionUpdated = tenant_connections.TenantConnection{
	ID:                        "ea5d975c-bd31-11e7-bcac-0050569c850d",
	TenantConnectionRequestID: "90381138-b572-11e7-9391-0050569c850d",
	Name:                      "update_name",
	Description:               "update_desc",
	Tags: map[string]string{
		"update_tags": "update",
	},
	TenantID:         "c7f3a68a73e845d4ba6a42fb80fce03f",
	NameOther:        "test_name_other_2",
	DescriptionOther: "test_desc_other_2",
	TagsOther: map[string]string{
		"test_tags_other2": "test2",
	},
	TenantIDOther:     "7e91b19b9baa423793ee74a8e1ff2be1",
	NetworkID:         "c4d5fc41-b7e8-4f19-96f4-85299e54373c",
	DeviceType:        "ECL::Compute::Server",
	DeviceID:          "7cc34d4b-a345-4e51-b3d9-62540faca7bf",
	DeviceInterfaceID: "",
	PortID:            "c9c3de44-0720-4acd-87c1-9c76f0f77cac",
	Status:            "down",
}

SecondTenantConnectionUpdated is how second tenant_connection should look after an Update.

Functions

func HandleBlankUpdateTenantConnectionSuccessfully

func HandleBlankUpdateTenantConnectionSuccessfully(t *testing.T)

HandleBlankUpdateTenantConnectionSuccessfully creates an HTTP handler at `/tenant_connections` on the test handler mux that tests tenant_connection update with blank.

func HandleCreateTenantConnectionAttachBaremetalServerSuccessfully

func HandleCreateTenantConnectionAttachBaremetalServerSuccessfully(t *testing.T)

HandleCreateTenantConnectionAttachBaremetalServerSuccessfully creates an HTTP handler at `/tenant_connections` on the test handler mux that tests creation of tenant_connection with Baremetal Server attached.

func HandleCreateTenantConnectionAttachComputeServerSuccessfully

func HandleCreateTenantConnectionAttachComputeServerSuccessfully(t *testing.T)

HandleCreateTenantConnectionAttachComputeServerSuccessfully creates an HTTP handler at `/tenant_connections` on the test handler mux that tests creation of tenant_connection with Compute Server attached.

func HandleCreateTenantConnectionAttachVnaSuccessfully

func HandleCreateTenantConnectionAttachVnaSuccessfully(t *testing.T)

HandleCreateTenantConnectionAttachVnaSuccessfully creates an HTTP handler at `/tenant_connections` on the test handler mux that that tests creation of tenant_connection with Vna attached.

func HandleDeleteTenantConnectionSuccessfully

func HandleDeleteTenantConnectionSuccessfully(t *testing.T)

HandleDeleteTenantConnectionSuccessfully creates an HTTP handler at `/tenant_connections` on the test handler mux that tests tenant_connection deletion.

func HandleGetTenantConnectionSuccessfully

func HandleGetTenantConnectionSuccessfully(t *testing.T)

HandleGetTenantConnectionSuccessfully creates an HTTP handler at `/tenant_connections` on the test handler mux that responds with a single tenant_connection.

func HandleListTenantConnectionsSuccessfully

func HandleListTenantConnectionsSuccessfully(t *testing.T)

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

func HandleNilUpdateTenantConnectionSuccessfully

func HandleNilUpdateTenantConnectionSuccessfully(t *testing.T)

HandleNilUpdateTenantConnectionSuccessfully creates an HTTP handler at `/tenant_connections` on the test handler mux that tests tenant_connection update with nil.

func HandleUpdateOtherMetadataTenantConnectionSuccessfully

func HandleUpdateOtherMetadataTenantConnectionSuccessfully(t *testing.T)

HandleUpdateOtherMetadataTenantConnectionSuccessfully creates an HTTP handler at `/tenant_connections` on the test handler mux that tests tenant_connection update to other metadata.

func HandleUpdateTenantConnectionSuccessfully

func HandleUpdateTenantConnectionSuccessfully(t *testing.T)

HandleUpdateTenantConnectionSuccessfully creates an HTTP handler at `/tenant_connections` on the test handler mux that tests tenant_connection update.

Types

This section is empty.

Jump to

Keyboard shortcuts

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