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 NewFakeConfig() *config.VirtualClusterConfig
- func NewFakeRegisterContext(pClient *testingutil.FakeIndexClient, vClient *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 ( DefaultTestTargetNamespace = "test" DefaultTestCurrentNamespace = "vcluster" DefaultTestVClusterName = "vcluster" DefaultTestVClusterServiceName = "vcluster" )
View Source
const (
FakeClientResourceVersion = "999"
)
Variables ¶
This section is empty.
Functions ¶
func CompareObjs ¶ added in v0.16.4
func FakeStartSyncer ¶
func FakeStartSyncer(t *testing.T, ctx *synccontext.RegisterContext, create func(ctx *synccontext.RegisterContext) (syncer.Object, error)) (*synccontext.SyncContext, syncer.Object)
func NewFakeConfig ¶ added in v0.20.0
func NewFakeConfig() *config.VirtualClusterConfig
func NewFakeRegisterContext ¶
func NewFakeRegisterContext(pClient *testingutil.FakeIndexClient, vClient *testingutil.FakeIndexClient) *synccontext.RegisterContext
func RunTestsWithContext ¶ added in v0.7.0
func RunTestsWithContext(t *testing.T, createContext NewContextFunc, tests []*SyncTest)
Types ¶
type NewContextFunc ¶ added in v0.7.0
type NewContextFunc func(pClient *testingutil.FakeIndexClient, vClient *testingutil.FakeIndexClient) *synccontext.RegisterContext
type SyncTest ¶
type SyncTest struct { Name string Focus bool InitialPhysicalState []runtime.Object InitialVirtualState []runtime.Object ExpectedPhysicalState map[schema.GroupVersionKind][]runtime.Object ExpectedVirtualState map[schema.GroupVersionKind][]runtime.Object Sync func(ctx *synccontext.RegisterContext) Compare Compare }
Click to show internal directories.
Click to hide internal directories.