Documentation ¶
Overview ¶
Compute Server unit tests
Index ¶
- Constants
- Variables
- func HandleCreateImageSuccessfully(t *testing.T)
- func HandleCreateMetadatumSuccessfully(t *testing.T)
- func HandleCreateServerSuccessfully(t *testing.T)
- func HandleDeleteMetadatumSuccessfully(t *testing.T)
- func HandleDeleteServerSuccessfully(t *testing.T)
- func HandleGetMetadataSuccessfully(t *testing.T)
- func HandleGetMetadatumSuccessfully(t *testing.T)
- func HandleGetServerSuccessfully(t *testing.T)
- func HandleListServersDetailsSuccessfully(t *testing.T)
- func HandleListServersSuccessfully(t *testing.T)
- func HandleResetMetadataSuccessfully(t *testing.T)
- func HandleResizeServerSuccessfully(t *testing.T)
- func HandleUpdateMetadataSuccessfully(t *testing.T)
- func HandleUpdateServerSuccessfully(t *testing.T)
Constants ¶
const CreateRequest = `` /* 340-byte string literal not displayed */
CreateRequest provides the input to a Create request.
const CreateResponse = `` /* 526-byte string literal not displayed */
const GetResult = `` /* 1811-byte string literal not displayed */
GetResult provides a Get result.
const ListDetailsResult = `` /* 3749-byte string literal not displayed */
ListDetailsResult provides a single page of Server results in details.
const ListResult = `` /* 877-byte string literal not displayed */
ListResult provides a single page of Server results.
const UpdateRequest = `
{
"server": {
"name": "Update Name"
}
}
`
const UpdateResponse = `` /* 1394-byte string literal not displayed */
Variables ¶
var CreateImageRequest = `
{
"createImage": {
"metadata": {
"key": "create_image"
},
"name": "Test Create Image"
}
}
`
var CreateMetadatumRequest = `
{
"meta": {
"key1": "val1"
}
}
`
var CreateMetadatumResponse = CreateMetadatumRequest
var MetadataResult = `
{
"metadata": {
"vmha": "false",
"HA_Enabled": "false"
}
}
`
var MetadatumResult = `
{
"meta": {
"vmha": "false"
}
}
`
var ResetMetadataRequest = `
{
"metadata": {
"key1": "val1",
"key2": "val2"
}
}
`
var ResetMetadataResponse = ResetMetadataRequest
var ResizeRequest = `
{
"resize": {
"flavorRef": "2CPU-8GB"
}
}
`
var UpdateMetadataRequest = `
{
"metadata": {
"key1": "update_val"
}
}
`
var UpdateMetadataResponse = UpdateMetadataRequest
Functions ¶
func HandleCreateImageSuccessfully ¶
HandleCreateImageSuccessfully creates an HTTP handler at `/servers` on the test handler mux that tests create server image.
func HandleCreateMetadatumSuccessfully ¶
HandleCreateMetadatumSuccessfully creates an HTTP handler at `/servers` on the test handler mux that tests server metadata creation.
func HandleCreateServerSuccessfully ¶
HandleCreateServerSuccessfully creates an HTTP handler at `/servers` on the test handler mux that tests server creation.
func HandleDeleteMetadatumSuccessfully ¶
HandleDeleteMetadatumSuccessfully creates an HTTP handler at `/servers` on the test handler mux that tests server metadata deletion.
func HandleDeleteServerSuccessfully ¶
HandleDeleteServerSuccessfully creates an HTTP handler at `/servers` on the test handler mux that tests server deletion.
func HandleGetMetadataSuccessfully ¶
HandleGetMetadataSuccessfully creates an HTTP handler at `/servers` on the test handler mux that responds with a server metadata.
func HandleGetMetadatumSuccessfully ¶
HandleGetMetadatumSuccessfully creates an HTTP handler at `/servers` on the test handler mux that responds with a server metadatum.
func HandleGetServerSuccessfully ¶
HandleGetServerSuccessfully creates an HTTP handler at `/servers` on the test handler mux that responds with a single server.
func HandleListServersDetailsSuccessfully ¶
HandleListServersDetailsSuccessfully creates an HTTP handler at `/servers/detail` on the test handler mux that responds with a list of two servers.
func HandleListServersSuccessfully ¶
HandleListServersSuccessfully creates an HTTP handler at `/servers` on the test handler mux that responds with a list of two servers.
func HandleResetMetadataSuccessfully ¶
HandleResetMetadataSuccessfully creates an HTTP handler at `/servers` on the test handler mux that tests server metadata reset.
func HandleResizeServerSuccessfully ¶
HandleResizeServerSuccessfully creates an HTTP handler at `/servers` on the test handler mux that tests server resize action.
func HandleUpdateMetadataSuccessfully ¶
HandleUpdateMetadataSuccessfully creates an HTTP handler at `/servers` on the test handler mux that tests server metadata update.
func HandleUpdateServerSuccessfully ¶
HandleUpdateServerSuccessfully creates an HTTP handler at `/servers` on the test handler mux that tests server update.
Types ¶
This section is empty.