Documentation ¶
Overview ¶
loadbalancers unit tests
Index ¶
Constants ¶
View Source
const CreateRequest = `` /* 1069-byte string literal not displayed */
View Source
const CreateResponse = `
{
"tasks": [
"50f53a35-42ed-40c4-82b2-5a37fb3e00bc"
]
}
`
View Source
const DeleteResponse = `
{
"tasks": [
"50f53a35-42ed-40c4-82b2-5a37fb3e00bc"
]
}
`
View Source
const ListCustomSecurityGroupResponse = `
{
"count": 1,
"results": [
{
"id": "2bf3a5d7-9072-40aa-8ac0-a64e39427a2c",
"name": "Test"
}
]
}
`
View Source
const UpdateRequest = `
{
"name": "lbname"
}
`
Variables ¶
View Source
var ( LoadBalancer1 = loadbalancers.LoadBalancer{ Name: "lbname", ID: "e8ab1be4-1521-4266-be69-28dad4148a30", ProvisioningStatus: types.ProvisioningStatusActive, OperationStatus: types.OperatingStatusOnline, VipAddress: net.ParseIP("5.5.5.5"), Listeners: []gcorecloud.ItemID{{ ID: "43658ea9-54bd-4807-90b1-925921c9a0d1", }}, CreatorTaskID: &creatorTaskID, TaskID: nil, CreatedAt: createdTime, UpdatedAt: &updatedTime, ProjectID: fake.ProjectID, RegionID: fake.RegionID, Region: "RegionOne", Metadata: []metadata.Metadata{testing.ResourceMetadataReadOnly}, } Tasks1 = tasks.TaskResults{ Tasks: []tasks.TaskID{"50f53a35-42ed-40c4-82b2-5a37fb3e00bc"}, } ExpectedLoadBalancerSlice = []loadbalancers.LoadBalancer{LoadBalancer1} LbSecurityGroup1 = loadbalancers.CustomSecurityGroup{ ID: "2bf3a5d7-9072-40aa-8ac0-a64e39427a2c", Name: "Test", } ExpectedLbSecurityGroupSlice = []loadbalancers.CustomSecurityGroup{LbSecurityGroup1} )
View Source
var GetResponse = fmt.Sprintf(` { "region": "RegionOne", "created_at": "2020-01-24T13:57:12+0000", "name": "lbname", "id": "e8ab1be4-1521-4266-be69-28dad4148a30", "provisioning_status": "ACTIVE", "updated_at": "2020-01-24T13:57:35+0000", "listeners": [ { "id": "43658ea9-54bd-4807-90b1-925921c9a0d1" } ], "task_id": null, "creator_task_id": "9f3ec11e-bcd4-4fe6-924a-a4439a56ad22", "vip_address": "5.5.5.5", "operating_status": "ONLINE", "project_id": 1, "region_id": 1, "metadata": [%s] } `, testing.MetadataResponse)
View Source
var ListResponse = fmt.Sprintf(` { "count": 1, "results": [ { "region": "RegionOne", "created_at": "2020-01-24T13:57:12+0000", "name": "lbname", "id": "e8ab1be4-1521-4266-be69-28dad4148a30", "provisioning_status": "ACTIVE", "updated_at": "2020-01-24T13:57:35+0000", "listeners": [ { "id": "43658ea9-54bd-4807-90b1-925921c9a0d1" } ], "task_id": null, "creator_task_id": "9f3ec11e-bcd4-4fe6-924a-a4439a56ad22", "vip_address": "5.5.5.5", "operating_status": "ONLINE", "project_id": 1, "region_id": 1, "metadata": [%s] } ] } `, testing.MetadataResponse)
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.