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 ¶ 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) 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 TestFixture ¶
SetUp is likely to be fixture-specific, but TearDown needs to be consistent to enable TearDownOnPanic.