testing

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

monitors unit tests

Index

Constants

View Source
const HealthmonitorsListBody = `` /* 710-byte string literal not displayed */

HealthmonitorsListBody contains the canned body of a healthmonitor list response.

View Source
const PostUpdateHealthmonitorBody = `` /* 414-byte string literal not displayed */

PostUpdateHealthmonitorBody is the canned response body of a Update request on an existing healthmonitor.

View Source
const SingleHealthmonitorBody = `` /* 381-byte string literal not displayed */

SingleHealthmonitorBody is the canned body of a Get request on an existing healthmonitor.

Variables

View Source
var (
	HealthmonitorWeb = monitors.Monitor{
		AdminStateUp:   true,
		Name:           "web",
		ProjectID:      "83657cfcdfe44cd5920adaf26c48ceea",
		Delay:          10,
		MaxRetries:     1,
		MaxRetriesDown: 7,
		Timeout:        1,
		Type:           "PING",
		ID:             "466c8345-28d8-4f84-a246-e04380b0461d",
		Pools:          []monitors.PoolID{{ID: "84f1b61f-58c4-45bf-a8a9-2dafb9e5214d"}},
	}
	HealthmonitorDb = monitors.Monitor{
		AdminStateUp:   true,
		Name:           "db",
		ProjectID:      "83657cfcdfe44cd5920adaf26c48ceea",
		Delay:          5,
		ExpectedCodes:  "200",
		MaxRetries:     2,
		MaxRetriesDown: 4,
		Timeout:        2,
		URLPath:        "/",
		Type:           "HTTP",
		HTTPMethod:     "GET",
		ID:             "5d4b5228-33b0-4e60-b225-9b727c1a20e7",
		Pools:          []monitors.PoolID{{ID: "d459f7d8-c6ee-439d-8713-d3fc08aeed8d"}},
	}
	HealthmonitorUpdated = monitors.Monitor{
		AdminStateUp:   true,
		Name:           "NewHealthmonitorName",
		ProjectID:      "83657cfcdfe44cd5920adaf26c48ceea",
		Delay:          3,
		ExpectedCodes:  "301",
		MaxRetries:     10,
		MaxRetriesDown: 8,
		Timeout:        20,
		URLPath:        "/another_check",
		Type:           "HTTP",
		HTTPMethod:     "GET",
		ID:             "5d4b5228-33b0-4e60-b225-9b727c1a20e7",
		Pools:          []monitors.PoolID{{ID: "d459f7d8-c6ee-439d-8713-d3fc08aeed8d"}},
	}
)

Functions

func HandleHealthmonitorCreationSuccessfully

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

HandleHealthmonitorCreationSuccessfully sets up the test server to respond to a healthmonitor creation request with a given response.

func HandleHealthmonitorDeletionSuccessfully

func HandleHealthmonitorDeletionSuccessfully(t *testing.T)

HandleHealthmonitorDeletionSuccessfully sets up the test server to respond to a healthmonitor deletion request.

func HandleHealthmonitorGetSuccessfully

func HandleHealthmonitorGetSuccessfully(t *testing.T)

HandleHealthmonitorGetSuccessfully sets up the test server to respond to a healthmonitor Get request.

func HandleHealthmonitorListSuccessfully

func HandleHealthmonitorListSuccessfully(t *testing.T)

HandleHealthmonitorListSuccessfully sets up the test server to respond to a healthmonitor List request.

func HandleHealthmonitorUpdateSuccessfully

func HandleHealthmonitorUpdateSuccessfully(t *testing.T)

HandleHealthmonitorUpdateSuccessfully sets up the test server to respond to a healthmonitor 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