tests

package
v0.17.30 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: Apache-2.0 Imports: 30 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ControllerConfFile = "./testdata/config/ctrl.yml"
	RouterConfFile     = "./testdata/config/router-%v.yml"
)

Variables

This section is empty.

Functions

func NewVersionProviderTest

func NewVersionProviderTest() common.VersionProvider

Types

type MgmtClient added in v0.16.131

type MgmtClient struct {
	*TestContext
	// contains filtered or unexported fields
}

func (*MgmtClient) EnrollRouter added in v0.16.131

func (self *MgmtClient) EnrollRouter(id string, name string, certFile string)

func (*MgmtClient) ListServices added in v0.16.131

func (self *MgmtClient) ListServices(query string) []*mgmt_pb.Service

type TestContext

type TestContext struct {
	Req *require.Assertions

	LogLevel         string
	ControllerConfig *controller.Config
	// contains filtered or unexported fields
}

func NewTestContext

func NewTestContext(t *testing.T) *TestContext

func (*TestContext) NewHttpClient

func (ctx *TestContext) NewHttpClient(transport *http.Transport) *http.Client

func (*TestContext) NewRestClient added in v0.17.1

func (ctx *TestContext) NewRestClient(i identity.Identity) *resty.Client

func (*TestContext) NewRestClientWithDefaults

func (ctx *TestContext) NewRestClientWithDefaults() *resty.Client

func (*TestContext) NewTransport

func (ctx *TestContext) NewTransport(i identity.Identity) *http.Transport

func (*TestContext) StartServer

func (ctx *TestContext) StartServer()

func (*TestContext) StartServerFor

func (ctx *TestContext) StartServerFor(test string, clean bool)

func (*TestContext) T

func (ctx *TestContext) T() *testing.T

func (*TestContext) Teardown

func (ctx *TestContext) Teardown()

type VersionProviderTest

type VersionProviderTest struct {
}

func (VersionProviderTest) AsVersionInfo

func (v VersionProviderTest) AsVersionInfo() *common.VersionInfo

func (VersionProviderTest) Branch

func (v VersionProviderTest) Branch() string

func (VersionProviderTest) BuildDate

func (v VersionProviderTest) BuildDate() string

func (VersionProviderTest) EncoderDecoder

func (v VersionProviderTest) EncoderDecoder() common.VersionEncDec

func (VersionProviderTest) Revision

func (v VersionProviderTest) Revision() string

func (VersionProviderTest) Version

func (v VersionProviderTest) Version() string

Jump to

Keyboard shortcuts

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