testutil

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeClient

func MakeClient(t *testing.T, server *cst.TestServer) *consultant.Client

func MakeServer

func MakeServer(t *testing.T, cb cst.ServerConfigCallback) *cst.TestServer

func MakeServerAndClient

func MakeServerAndClient(t *testing.T, cb cst.ServerConfigCallback) (*cst.TestServer, *consultant.Client)

func RandomPort

func RandomPort() int

shamelessly copy-pasted from and old version of consul test util randomPort asks the kernel for a random port to use.

Types

type TestConsulCluster

type TestConsulCluster struct {
	// contains filtered or unexported fields
}

func MakeCluster

func MakeCluster(t *testing.T, nodeCount int) (*TestConsulCluster, error)

func (*TestConsulCluster) Client

func (c *TestConsulCluster) Client(node int) *consultant.Client

func (*TestConsulCluster) RandomClient

func (c *TestConsulCluster) RandomClient() *consultant.Client

func (*TestConsulCluster) Server

func (c *TestConsulCluster) Server(node int) *cst.TestServer

func (*TestConsulCluster) Shutdown

func (c *TestConsulCluster) Shutdown()

Jump to

Keyboard shortcuts

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