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 GetOutput = `` /* 218-byte string literal not displayed */
GetOutput is a sample response to a Get call.
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 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 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.