Documentation ¶
Index ¶
- Constants
- func FakeStartSyncer(t *testing.T, ctx *synccontext.RegisterContext, ...) (*synccontext.SyncContext, syncer.Object)
- 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 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(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.