Documentation ¶
Overview ¶
pools unit tests
Index ¶
- Constants
- Variables
- func HandleMemberCreationSuccessfully(t *testing.T, response string)
- func HandleMemberDeletionSuccessfully(t *testing.T)
- func HandleMemberGetSuccessfully(t *testing.T)
- func HandleMemberListSuccessfully(t *testing.T)
- func HandleMemberUpdateSuccessfully(t *testing.T)
- func HandlePoolCreationSuccessfully(t *testing.T, response string)
- func HandlePoolDeletionSuccessfully(t *testing.T)
- func HandlePoolGetSuccessfully(t *testing.T)
- func HandlePoolListSuccessfully(t *testing.T)
- func HandlePoolUpdateSuccessfully(t *testing.T)
Constants ¶
const MembersListBody = `` /* 573-byte string literal not displayed */
MembersListBody contains the canned body of a member list response.
const PoolsListBody = `` /* 1054-byte string literal not displayed */
PoolsListBody contains the canned body of a pool list response.
const PostUpdateMemberBody = `` /* 281-byte string literal not displayed */
PostUpdateMemberBody is the canned response body of a Update request on an existing member.
const PostUpdatePoolBody = `` /* 514-byte string literal not displayed */
PostUpdatePoolBody is the canned response body of a Update request on an existing pool.
const SingleMemberBody = `` /* 281-byte string literal not displayed */
SingleMemberBody is the canned body of a Get request on an existing member.
const SinglePoolBody = `` /* 514-byte string literal not displayed */
SinglePoolBody is the canned body of a Get request on an existing pool.
Variables ¶
var ( PoolWeb = pools.Pool{ LBMethod: "ROUND_ROBIN", Protocol: "HTTP", Description: "", MonitorID: "466c8345-28d8-4f84-a246-e04380b0461d", TenantID: "83657cfcdfe44cd5920adaf26c48ceea", AdminStateUp: true, Name: "web", Members: []pools.MemberID{{ID: "53306cda-815d-4354-9fe4-59e09da9c3c5"}}, ID: "72741b06-df4d-4715-b142-276b6bce75ab", Loadbalancers: []pools.LoadBalancerID{{ID: "79e05663-7f03-45d2-a092-8b94062f22ab"}}, Listeners: []pools.ListenerID{{ID: "2a280670-c202-4b0b-a562-34077415aabf"}}, } PoolDb = pools.Pool{ LBMethod: "LEAST_CONNECTION", Protocol: "HTTP", Description: "", MonitorID: "5f6c8345-28d8-4f84-a246-e04380b0461d", TenantID: "83657cfcdfe44cd5920adaf26c48ceea", AdminStateUp: true, Name: "db", Members: []pools.MemberID{{ID: "67306cda-815d-4354-9fe4-59e09da9c3c5"}}, ID: "c3741b06-df4d-4715-b142-276b6bce75ab", Loadbalancers: []pools.LoadBalancerID{{ID: "79e05663-7f03-45d2-a092-8b94062f22ab"}}, Listeners: []pools.ListenerID{{ID: "2a280670-c202-4b0b-a562-34077415aabf"}}, } PoolUpdated = pools.Pool{ LBMethod: "LEAST_CONNECTION", Protocol: "HTTP", Description: "", MonitorID: "5f6c8345-28d8-4f84-a246-e04380b0461d", TenantID: "83657cfcdfe44cd5920adaf26c48ceea", AdminStateUp: true, Name: "db", Members: []pools.MemberID{{ID: "67306cda-815d-4354-9fe4-59e09da9c3c5"}}, ID: "c3741b06-df4d-4715-b142-276b6bce75ab", Loadbalancers: []pools.LoadBalancerID{{ID: "79e05663-7f03-45d2-a092-8b94062f22ab"}}, Listeners: []pools.ListenerID{{ID: "2a280670-c202-4b0b-a562-34077415aabf"}}, } )
var ( MemberWeb = pools.Member{ SubnetID: "1981f108-3c48-48d2-b908-30f7d28532c9", TenantID: "2ffc6e22aae24e4795f87155d24c896f", AdminStateUp: true, Name: "web", ID: "2a280670-c202-4b0b-a562-34077415aabf", Address: "10.0.2.10", Weight: 5, ProtocolPort: 80, } MemberDb = pools.Member{ SubnetID: "1981f108-3c48-48d2-b908-30f7d28532c9", TenantID: "2ffc6e22aae24e4795f87155d24c896f", AdminStateUp: false, Name: "db", ID: "fad389a3-9a4a-4762-a365-8c7038508b5d", Address: "10.0.2.11", Weight: 10, ProtocolPort: 80, } MemberUpdated = pools.Member{ SubnetID: "1981f108-3c48-48d2-b908-30f7d28532c9", TenantID: "2ffc6e22aae24e4795f87155d24c896f", AdminStateUp: false, Name: "db", ID: "fad389a3-9a4a-4762-a365-8c7038508b5d", Address: "10.0.2.11", Weight: 10, ProtocolPort: 80, } )
Functions ¶
func HandleMemberCreationSuccessfully ¶
HandleMemberCreationSuccessfully sets up the test server to respond to a member creation request with a given response.
func HandleMemberDeletionSuccessfully ¶
HandleMemberDeletionSuccessfully sets up the test server to respond to a member deletion request.
func HandleMemberGetSuccessfully ¶
HandleMemberGetSuccessfully sets up the test server to respond to a member Get request.
func HandleMemberListSuccessfully ¶
HandleMemberListSuccessfully sets up the test server to respond to a member List request.
func HandleMemberUpdateSuccessfully ¶
HandleMemberUpdateSuccessfully sets up the test server to respond to a member Update request.
func HandlePoolCreationSuccessfully ¶
HandlePoolCreationSuccessfully sets up the test server to respond to a pool creation request with a given response.
func HandlePoolDeletionSuccessfully ¶
HandlePoolDeletionSuccessfully sets up the test server to respond to a pool deletion request.
func HandlePoolGetSuccessfully ¶
HandlePoolGetSuccessfully sets up the test server to respond to a pool Get request.
func HandlePoolListSuccessfully ¶
HandlePoolListSuccessfully sets up the test server to respond to a pool List request.
func HandlePoolUpdateSuccessfully ¶
HandlePoolUpdateSuccessfully sets up the test server to respond to a pool Update request.
Types ¶
This section is empty.