Documentation ¶
Overview ¶
tenantnetworks unit tests
Index ¶
Constants ¶
View Source
const GetOutput = `
{
"network": {
"cidr": "10.0.0.10/29",
"id": "20c8acc0-f747-4d71-a389-46d078ebf000",
"label": "mynet_1"
}
}
`
GetOutput is a sample response to a Get call.
View Source
const ListOutput = `` /* 319-byte string literal not displayed */
ListOutput is a sample response to a List call.
Variables ¶
View Source
var ExpectedNetworkSlice = []tenantnetworks.Network{FirstNetwork, SecondNetwork}
ExpectedNetworkSlice is the slice of results that should be parsed from ListOutput, in the expected order.
View Source
var FirstNetwork = tenantnetworks.Network{
CIDR: "10.0.0.0/29",
ID: "20c8acc0-f747-4d71-a389-46d078ebf047",
Name: "mynet_0",
}
FirstNetwork is the first result in ListOutput.
View Source
var SecondNetwork = tenantnetworks.Network{
CIDR: "10.0.0.10/29",
ID: "20c8acc0-f747-4d71-a389-46d078ebf000",
Name: "mynet_1",
}
SecondNetwork is the second result in ListOutput.
Functions ¶
func HandleGetSuccessfully ¶
HandleGetSuccessfully configures the test server to respond to a Get request for an existing network.
func HandleListSuccessfully ¶
HandleListSuccessfully configures the test server to respond to a List request.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.