Documentation ¶
Index ¶
- Constants
- func CompareObjs(ctx context.Context, t *testing.T, state string, c client.Client, ...) error
- func FakeStartSyncer(t *testing.T, ctx *synccontext.RegisterContext, ...) (*synccontext.SyncContext, syncer.Object)
- func NewFakeRegisterContext(vConfig *config.VirtualClusterConfig, pClient *testingutil.FakeIndexClient, ...) *synccontext.RegisterContext
- func RunTests(t *testing.T, tests []*SyncTest)
- func RunTestsWithContext(t *testing.T, createContext NewContextFunc, tests []*SyncTest)
- type Compare
- type NewContextFunc
- type SyncTest
Constants ¶
View Source
const (
FakeClientResourceVersion = "999"
)
Variables ¶
This section is empty.
Functions ¶
func CompareObjs ¶
func FakeStartSyncer ¶
func FakeStartSyncer(t *testing.T, ctx *synccontext.RegisterContext, create func(ctx *synccontext.RegisterContext) (syncer.Object, error)) (*synccontext.SyncContext, syncer.Object)
func NewFakeRegisterContext ¶
func NewFakeRegisterContext(vConfig *config.VirtualClusterConfig, pClient *testingutil.FakeIndexClient, vClient *testingutil.FakeIndexClient) *synccontext.RegisterContext
func RunTestsWithContext ¶
func RunTestsWithContext(t *testing.T, createContext NewContextFunc, tests []*SyncTest)
Types ¶
type NewContextFunc ¶
type NewContextFunc func(vConfig *config.VirtualClusterConfig, pClient *testingutil.FakeIndexClient, vClient *testingutil.FakeIndexClient) *synccontext.RegisterContext
type SyncTest ¶
type SyncTest struct { ExpectedPhysicalState map[schema.GroupVersionKind][]runtime.Object ExpectedVirtualState map[schema.GroupVersionKind][]runtime.Object Sync func(ctx *synccontext.RegisterContext) Compare Compare AdjustConfig func(vConfig *config.VirtualClusterConfig) Name string InitialPhysicalState []runtime.Object InitialVirtualState []runtime.Object // contains filtered or unexported fields }
func (*SyncTest) Setup ¶
func (s *SyncTest) Setup() (*testingutil.FakeIndexClient, *testingutil.FakeIndexClient, *config.VirtualClusterConfig)
Click to show internal directories.
Click to hide internal directories.