framework

package
v1.8.0-alpha.2....-f6929fc Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2017 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWaitInterval = 50 * time.Millisecond
)

Variables

This section is empty.

Functions

func GetRunOptions

func GetRunOptions() *options.ServerRunOptions

GetRunOptions returns the default run options that can be used to run a test federation apiserver.

func TearDownOnPanic

func TearDownOnPanic(t *testing.T, f TestFixture)

TearDownOnPanic can be used to ensure cleanup on setup failure.

Types

type ControllerFixture

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

ControllerFixture manages a federation controller for testing.

func NewControllerFixture

func NewControllerFixture(t *testing.T, kind string, adapterFactory federatedtypes.AdapterFactory, config *restclient.Config) *ControllerFixture

NewControllerFixture initializes a new controller fixture

func (*ControllerFixture) TearDown

func (f *ControllerFixture) TearDown(t *testing.T)

type FederationAPIFixture

type FederationAPIFixture struct {
	Host string
	// contains filtered or unexported fields
}

FederationAPIFixture manages a federation api server

func (*FederationAPIFixture) NewClient

func (f *FederationAPIFixture) NewClient(userAgent string) federationclientset.Interface

func (*FederationAPIFixture) NewConfig

func (f *FederationAPIFixture) NewConfig() *restclient.Config

func (*FederationAPIFixture) SetUp

func (f *FederationAPIFixture) SetUp(t *testing.T)

SetUp runs federation apiserver with default run options.

func (*FederationAPIFixture) SetUpWithRunOptions

func (f *FederationAPIFixture) SetUpWithRunOptions(t *testing.T, runOptions *options.ServerRunOptions)

SetUpWithRunOptions runs federation apiserver with the given run options. Uses default run options if runOptions is nil.

func (*FederationAPIFixture) TearDown

func (f *FederationAPIFixture) TearDown(t *testing.T)

type FederationFixture

type FederationFixture struct {
	APIFixture          *FederationAPIFixture
	DesiredClusterCount int
	Clusters            []*MemberCluster

	ClusterClients    []clientset.Interface
	ClusterController *clustercontroller.ClusterController
	// contains filtered or unexported fields
}

FederationFixture manages a federation api server and a set of member clusters

func (*FederationFixture) SetUp

func (f *FederationFixture) SetUp(t *testing.T)

func (*FederationFixture) StartCluster

func (f *FederationFixture) StartCluster(t *testing.T)

func (*FederationFixture) TearDown

func (f *FederationFixture) TearDown(t *testing.T)

type IntegrationLogger

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

func (*IntegrationLogger) Fatal

func (l *IntegrationLogger) Fatal(msg string)

func (*IntegrationLogger) Fatalf

func (l *IntegrationLogger) Fatalf(format string, args ...interface{})

func (*IntegrationLogger) Logf

func (l *IntegrationLogger) Logf(format string, args ...interface{})

type MemberCluster

type MemberCluster struct {
	CloseFn framework.CloseFunc
	Config  *master.Config
	Client  clientset.Interface
	Host    string
	// contains filtered or unexported fields
}

type TestFixture

type TestFixture interface {
	TearDown(t *testing.T)
}

SetUp is likely to be fixture-specific, but TearDown needs to be consistent to enable TearDownOnPanic.

Jump to

Keyboard shortcuts

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