testing

package
v0.0.0-...-e621b23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

pools unit tests

Index

Constants

View Source
const MembersListBody = `` /* 573-byte string literal not displayed */

MembersListBody contains the canned body of a member list response.

View Source
const PoolsListBody = `` /* 1054-byte string literal not displayed */

PoolsListBody contains the canned body of a pool list response.

View Source
const PostUpdateMemberBody = `` /* 281-byte string literal not displayed */

PostUpdateMemberBody is the canned response body of a Update request on an existing member.

View Source
const PostUpdatePoolBody = `` /* 514-byte string literal not displayed */

PostUpdatePoolBody is the canned response body of a Update request on an existing pool.

View Source
const SingleMemberBody = `` /* 281-byte string literal not displayed */

SingleMemberBody is the canned body of a Get request on an existing member.

View Source
const SinglePoolBody = `` /* 514-byte string literal not displayed */

SinglePoolBody is the canned body of a Get request on an existing pool.

Variables

View Source
var (
	PoolWeb = pools.Pool{
		LBMethod:      "ROUND_ROBIN",
		Protocol:      "HTTP",
		Description:   "",
		MonitorID:     "466c8345-28d8-4f84-a246-e04380b0461d",
		TenantID:      "83657cfcdfe44cd5920adaf26c48ceea",
		AdminStateUp:  true,
		Name:          "web",
		Members:       []pools.Member{{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"}},
		Provider:      "haproxy",
	}
	PoolDb = pools.Pool{
		LBMethod:      "LEAST_CONNECTION",
		Protocol:      "HTTP",
		Description:   "",
		MonitorID:     "5f6c8345-28d8-4f84-a246-e04380b0461d",
		TenantID:      "83657cfcdfe44cd5920adaf26c48ceea",
		AdminStateUp:  true,
		Name:          "db",
		Members:       []pools.Member{{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"}},
		Provider:      "haproxy",
	}
	PoolUpdated = pools.Pool{
		LBMethod:      "LEAST_CONNECTION",
		Protocol:      "HTTP",
		Description:   "",
		MonitorID:     "5f6c8345-28d8-4f84-a246-e04380b0461d",
		TenantID:      "83657cfcdfe44cd5920adaf26c48ceea",
		AdminStateUp:  true,
		Name:          "db",
		Members:       []pools.Member{{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"}},
		Provider:      "haproxy",
	}
)
View Source
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

func HandleMemberCreationSuccessfully(t *testing.T, response string)

HandleMemberCreationSuccessfully sets up the test server to respond to a member creation request with a given response.

func HandleMemberDeletionSuccessfully

func HandleMemberDeletionSuccessfully(t *testing.T)

HandleMemberDeletionSuccessfully sets up the test server to respond to a member deletion request.

func HandleMemberGetSuccessfully

func HandleMemberGetSuccessfully(t *testing.T)

HandleMemberGetSuccessfully sets up the test server to respond to a member Get request.

func HandleMemberListSuccessfully

func HandleMemberListSuccessfully(t *testing.T)

HandleMemberListSuccessfully sets up the test server to respond to a member List request.

func HandleMemberUpdateSuccessfully

func HandleMemberUpdateSuccessfully(t *testing.T)

HandleMemberUpdateSuccessfully sets up the test server to respond to a member Update request.

func HandlePoolCreationSuccessfully

func HandlePoolCreationSuccessfully(t *testing.T, response string)

HandlePoolCreationSuccessfully sets up the test server to respond to a pool creation request with a given response.

func HandlePoolDeletionSuccessfully

func HandlePoolDeletionSuccessfully(t *testing.T)

HandlePoolDeletionSuccessfully sets up the test server to respond to a pool deletion request.

func HandlePoolGetSuccessfully

func HandlePoolGetSuccessfully(t *testing.T)

HandlePoolGetSuccessfully sets up the test server to respond to a pool Get request.

func HandlePoolListSuccessfully

func HandlePoolListSuccessfully(t *testing.T)

HandlePoolListSuccessfully sets up the test server to respond to a pool List request.

func HandlePoolUpdateSuccessfully

func HandlePoolUpdateSuccessfully(t *testing.T)

HandlePoolUpdateSuccessfully sets up the test server to respond to a pool Update request.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL