Documentation ¶
Overview ¶
servergroups unit tests
Index ¶
Constants ¶
const CreateOutput = `` /* 218-byte string literal not displayed */
CreateOutput is a sample response to a Post call
const CreateOutputMicroversion = `` /* 318-byte string literal not displayed */
CreateOutputMicroversion is a sample response to a Post call with microversion set to 2.64
const GetOutput = `` /* 218-byte string literal not displayed */
GetOutput is a sample response to a Get call.
const GetOutputMicroversion = `` /* 318-byte string literal not displayed */
GetOutputMicroversion is a sample response to a Get call with microversion set to 2.64
const ListOutput = `` /* 497-byte string literal not displayed */
ListOutput is a sample response to a List call.
Variables ¶
var CreatedServerGroup = servergroups.ServerGroup{ ID: "616fb98f-46ca-475e-917e-2563e5a8cd19", Name: "test", Policies: []string{ "anti-affinity", }, Members: []string{}, Metadata: map[string]interface{}{}, }
CreatedServerGroup is the parsed result from CreateOutput.
var ExpectedServerGroupSlice = []servergroups.ServerGroup{FirstServerGroup, SecondServerGroup}
ExpectedServerGroupSlice is the slice of results that should be parsed from ListOutput, in the expected order.
var FirstServerGroup = servergroups.ServerGroup{ ID: "616fb98f-46ca-475e-917e-2563e5a8cd19", Name: "test", Policies: []string{ "anti-affinity", }, Members: []string{}, Metadata: map[string]interface{}{}, }
FirstServerGroup is the first result in ListOutput.
var SecondServerGroup = servergroups.ServerGroup{ ID: "4d8c3732-a248-40ed-bebc-539a6ffd25c0", Name: "test2", Policies: []string{ "affinity", }, Members: []string{}, Metadata: map[string]interface{}{}, }
SecondServerGroup is the second result in ListOutput.
Functions ¶
func HandleCreateMicroversionSuccessfully ¶ added in v0.3.0
HandleCreateMicroversionSuccessfully configures the test server to respond to a Create request for a new server group with microversion set to 2.64
func HandleCreateSuccessfully ¶
HandleCreateSuccessfully configures the test server to respond to a Create request for a new server group
func HandleDeleteSuccessfully ¶
HandleDeleteSuccessfully configures the test server to respond to a Delete request for a an existing server group
func HandleGetMicroversionSuccessfully ¶ added in v0.3.0
HandleGetMicroversionSuccessfully configures the test server to respond to a Get request for an existing server group with microversion set to 2.64
func HandleGetSuccessfully ¶
HandleGetSuccessfully configures the test server to respond to a Get request for an existing server group
func HandleListSuccessfully ¶
HandleListSuccessfully configures the test server to respond to a List request.
Types ¶
This section is empty.