Documentation ¶
Overview ¶
Tenant Connection unit tests
Index ¶
- Constants
- Variables
- func HandleBlankUpdateTenantConnectionSuccessfully(t *testing.T)
- func HandleCreateTenantConnectionAttachBaremetalServerSuccessfully(t *testing.T)
- func HandleCreateTenantConnectionAttachComputeServerSuccessfully(t *testing.T)
- func HandleCreateTenantConnectionAttachVnaSuccessfully(t *testing.T)
- func HandleDeleteTenantConnectionSuccessfully(t *testing.T)
- func HandleGetTenantConnectionSuccessfully(t *testing.T)
- func HandleListTenantConnectionsSuccessfully(t *testing.T)
- func HandleNilUpdateTenantConnectionSuccessfully(t *testing.T)
- func HandleUpdateOtherMetadataTenantConnectionSuccessfully(t *testing.T)
- func HandleUpdateTenantConnectionSuccessfully(t *testing.T)
Constants ¶
const CreateAttachBaremetalServerRequest = `` /* 729-byte string literal not displayed */
CreateAttachBaremetalServerRequest provides the input to a Create request.
const CreateAttachBaremetalServerResponse = `` /* 836-byte string literal not displayed */
CreateAttachBaremetalServerResponse provides the output from a Create request.
const CreateAttachComputeServerRequest = `` /* 594-byte string literal not displayed */
CreateAttachComputeServerRequest provides the input to a Create request.
const CreateAttachComputeServerResponse = `` /* 786-byte string literal not displayed */
CreateAttachComputeServerResponse provides the output from a Create request.
const CreateAttachVnaRequest = `` /* 503-byte string literal not displayed */
CreateAttachVnaRequest provides the input to a Create request.
const CreateAttachVnaResponse = `` /* 777-byte string literal not displayed */
CreateAttachVnaResponse provides the output from a Create request.
const GetResult = `` /* 797-byte string literal not displayed */
GetResult provides a Get result.
const ListResult = `` /* 1579-byte string literal not displayed */
ListResult provides a single page of tenant_connection results.
const UpdateBlankRequest = `
{
"tenant_connection": {
"name": "",
"description": "",
"tags": {}
}
}
`
UpdateBlankRequest provides the input to as Update with blank request.
const UpdateBlankResult = `` /* 793-byte string literal not displayed */
UpdateBlankResult provides an update with blank result.
const UpdateNilRequest = `
{
"tenant_connection": {
"name": "nilupdate"
}
}
`
UpdateNilRequest provides the input to as Update with nil request.
const UpdateNilResult = `` /* 848-byte string literal not displayed */
UpdateNilResult provides an update with blank with nil result.
const UpdateOtherMetadataRequest = `` /* 176-byte string literal not displayed */
UpdateOtherMetadataRequest provides the input to as Update to other metadata request.
const UpdateOtherMetadataResult = `` /* 850-byte string literal not displayed */
UpdateOtherMetadataResult provides an update to other metadata result.
const UpdateRequest = `` /* 145-byte string literal not displayed */
UpdateRequest provides the input to as Update request.
const UpdateResult = `` /* 852-byte string literal not displayed */
UpdateResult provides an update result.
Variables ¶
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.
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.
var ExpectedTenantConnectionsSlice = []tenant_connections.TenantConnection{FirstTenantConnection, SecondTenantConnection}
ExpectedTenantConnectionsSlice is the slice of tenant_connection expected to be returned from ListResult.
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.
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.
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.
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.
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.
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 ¶
HandleBlankUpdateTenantConnectionSuccessfully creates an HTTP handler at `/tenant_connections` on the test handler mux that tests tenant_connection update with blank.
func HandleCreateTenantConnectionAttachBaremetalServerSuccessfully ¶
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 ¶
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 ¶
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 ¶
HandleDeleteTenantConnectionSuccessfully creates an HTTP handler at `/tenant_connections` on the test handler mux that tests tenant_connection deletion.
func HandleGetTenantConnectionSuccessfully ¶
HandleGetTenantConnectionSuccessfully creates an HTTP handler at `/tenant_connections` on the test handler mux that responds with a single tenant_connection.
func HandleListTenantConnectionsSuccessfully ¶
HandleListTenantConnectionsSuccessfully creates an HTTP handler at `/tenant_connections` on the test handler mux that responds with a list of two tenant_connections.
func HandleNilUpdateTenantConnectionSuccessfully ¶
HandleNilUpdateTenantConnectionSuccessfully creates an HTTP handler at `/tenant_connections` on the test handler mux that tests tenant_connection update with nil.
func HandleUpdateOtherMetadataTenantConnectionSuccessfully ¶
HandleUpdateOtherMetadataTenantConnectionSuccessfully creates an HTTP handler at `/tenant_connections` on the test handler mux that tests tenant_connection update to other metadata.
func HandleUpdateTenantConnectionSuccessfully ¶
HandleUpdateTenantConnectionSuccessfully creates an HTTP handler at `/tenant_connections` on the test handler mux that tests tenant_connection update.
Types ¶
This section is empty.