framework

package
v1.7.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: May 18, 2017 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func GetRunOptions added in v1.7.0

func GetRunOptions() *options.ServerRunOptions

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

func NewFederatedTypeCRUDTester added in v1.7.0

func NewFederatedTypeCRUDTester(t *testing.T, adapter federatedtypes.FederatedTypeAdapter, clusterClients []clientset.Interface) *crudtester.FederatedTypeCRUDTester

func TearDownOnPanic added in v1.7.0

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

TearDownOnPanic can be used to ensure cleanup on setup failure.

Types

type ControllerFixture added in v1.7.0

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

ControllerFixture manages a federation controller for testing.

func NewControllerFixture added in v1.7.0

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

NewControllerFixture initializes a new controller fixture

func (*ControllerFixture) TearDown added in v1.7.0

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 added in v1.7.0

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

func (*FederationAPIFixture) NewConfig added in v1.7.0

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

func (*FederationAPIFixture) SetUp added in v1.7.0

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

SetUp runs federation apiserver with default run options.

func (*FederationAPIFixture) SetUpWithRunOptions added in v1.7.0

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 added in v1.7.0

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

type FederationFixture added in v1.7.0

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 added in v1.7.0

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

func (*FederationFixture) StartCluster added in v1.7.0

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

func (*FederationFixture) TearDown added in v1.7.0

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

type IntegrationLogger added in v1.7.0

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

func (*IntegrationLogger) Fatal added in v1.7.0

func (l *IntegrationLogger) Fatal(msg string)

func (*IntegrationLogger) Fatalf added in v1.7.0

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

func (*IntegrationLogger) Logf added in v1.7.0

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

type MemberCluster added in v1.7.0

type MemberCluster struct {
	CloseFn framework.CloseFunc
	Config  *master.Config
	Client  clientset.Interface
	Host    string
}

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