Documentation ¶
Index ¶
- Constants
- func GetRunOptions() *options.ServerRunOptions
- func NewFederatedTypeCRUDTester(t *testing.T, adapter federatedtypes.FederatedTypeAdapter, ...) *crudtester.FederatedTypeCRUDTester
- func TearDownOnPanic(t *testing.T, f TestFixture)
- type ControllerFixture
- type FederationAPIFixture
- func (f *FederationAPIFixture) NewClient(userAgent string) federationclientset.Interface
- func (f *FederationAPIFixture) NewConfig() *restclient.Config
- func (f *FederationAPIFixture) SetUp(t *testing.T)
- func (f *FederationAPIFixture) SetUpWithRunOptions(t *testing.T, runOptions *options.ServerRunOptions)
- func (f *FederationAPIFixture) TearDown(t *testing.T)
- type FederationFixture
- type IntegrationLogger
- type MemberCluster
- type TestFixture
Constants ¶
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 NewFederatedTypeCRUDTester ¶
func NewFederatedTypeCRUDTester(t *testing.T, adapter federatedtypes.FederatedTypeAdapter, clusterClients []clientset.Interface) *crudtester.FederatedTypeCRUDTester
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 TestFixture ¶
SetUp is likely to be fixture-specific, but TearDown needs to be consistent to enable TearDownOnPanic.