Documentation ¶
Overview ¶
Package testing contains common function gateways unit tests
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CreateRequest = fmt.Sprintf(`
{
"common_function_gateway": {
"name": "%s",
"description": "%s",
"common_function_pool_id": "%s",
"tenant_id": "%s"
}
}`, nameCommonFunctionGateway1,
descriptionCommonFunctionGateway1,
idCommonFunctionPool,
tenantID)
CreateRequest is mocked request for common_function_gateways.Create
View Source
var CreateResponse = fmt.Sprintf(`
{
"common_function_gateway": {
"id": "%s",
"common_function_pool_id": "%s",
"name": "%s",
"description": "%s",
"tenant_id": "%s",
"network_id": "%s",
"subnet_id": "%s",
"status": "ACTIVE"
}
}`, idCommonFunctionGatway1,
idCommonFunctionPool,
nameCommonFunctionGateway1,
descriptionCommonFunctionGateway1,
tenantID,
networkID,
subnetID)
CreateResponse is mocked response of common_function_gateways.Create
View Source
var ExpectedCommonFunctionGatewaysSlice = []common_function_gateways.CommonFunctionGateway{
commonFunctionGateway1,
commonFunctionGateway2,
}
ExpectedCommonFunctionGatewaysSlice is expected assertion target
View Source
var GetResponse = fmt.Sprintf(`
{
"common_function_gateway": {
"id": "%s",
"common_function_pool_id": "%s",
"name": "%s",
"description": "%s",
"tenant_id": "%s",
"network_id": "%s",
"subnet_id": "%s",
"status": "ACTIVE"
}
}`, idCommonFunctionGatway1,
idCommonFunctionPool,
nameCommonFunctionGateway1,
descriptionCommonFunctionGateway1,
tenantID,
networkID,
subnetID)
GetResponse is mocked format of common_function_gateways.Get
View Source
var ListResponse = fmt.Sprintf(`
{
"common_function_gateways": [
{
"id": "%s",
"common_function_pool_id": "%s",
"name": "%s",
"description": "%s",
"tenant_id": "%s",
"network_id": "%s",
"subnet_id": "%s",
"status": "ACTIVE"
},
{
"id": "%s",
"common_function_pool_id": "%s",
"tenant_id": "%s",
"name": "common_function_gateway_name_2",
"description": "common_function_gateway_description_2",
"network_id": "%s",
"subnet_id": "%s",
"status": "ACTIVE"
}
]
}`,
idCommonFunctionGatway1,
idCommonFunctionPool,
nameCommonFunctionGateway1,
descriptionCommonFunctionGateway1,
tenantID,
networkID,
subnetID,
idCommonFunctionGatway2,
idCommonFunctionPool,
tenantID,
networkID,
subnetID)
ListResponse is mocked response of common_function_gateways.List
View Source
var UpdateRequest = fmt.Sprintf(`
{
"common_function_gateway": {
"name": "%s",
"description": "%s"
}
}`, nameCommonFunctionGateway1Update,
descriptionCommonFunctionGateway1Update)
UpdateRequest is mocked request of common_function_gateways.Update
View Source
var UpdateResponse = fmt.Sprintf(`
{
"common_function_gateway": {
"id": "%s",
"common_function_pool_id": "%s",
"name": "%s",
"description": "%s",
"tenant_id": "%s",
"network_id": "%s",
"subnet_id": "%s"
}
}`, idCommonFunctionGatway1,
idCommonFunctionPool,
nameCommonFunctionGateway1Update,
descriptionCommonFunctionGateway1Update,
tenantID,
networkID,
subnetID)
UpdateResponse is mocked response of common_function_gateways.Update
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.