Documentation ¶
Index ¶
- Constants
- func RunTests(t *testing.T, tests []*SyncTest)
- type Compare
- type FakeSyncer
- func (f *FakeSyncer) BackwardUpdate(ctx context.Context, pObj client.Object, vObj client.Object, ...) (ctrl.Result, error)
- func (f *FakeSyncer) BackwardUpdateNeeded(pObj client.Object, vObj client.Object) (bool, error)
- func (f *FakeSyncer) ForwardCreate(ctx context.Context, vObj client.Object, log loghelper.Logger) (ctrl.Result, error)
- func (f *FakeSyncer) ForwardUpdate(ctx context.Context, pObj client.Object, vObj client.Object, ...) (ctrl.Result, error)
- func (f *FakeSyncer) ForwardUpdateNeeded(pObj client.Object, vObj client.Object) (bool, error)
- func (f *FakeSyncer) New() client.Object
- func (f *FakeSyncer) NewList() client.ObjectList
- type SyncTest
Constants ¶
View Source
const (
FakeClientResourceVersion = "999"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FakeSyncer ¶
type FakeSyncer struct { ForwardCreateFn func(ctx context.Context, vObj client.Object, log loghelper.Logger) (ctrl.Result, error) ForwardUpdateFn func(ctx context.Context, pObj client.Object, vObj client.Object, log loghelper.Logger) (ctrl.Result, error) ForwardUpdateNeededFn func(pObj runtime.Object, vObj client.Object) (bool, error) BackwardUpdateFn func(ctx context.Context, pObj client.Object, vObj client.Object, log loghelper.Logger) (ctrl.Result, error) BackwardUpdateNeededFn func(pObj client.Object, vObj client.Object) (bool, error) }
func (*FakeSyncer) BackwardUpdate ¶
func (*FakeSyncer) BackwardUpdateNeeded ¶
func (*FakeSyncer) ForwardCreate ¶
func (*FakeSyncer) ForwardUpdate ¶
func (*FakeSyncer) ForwardUpdateNeeded ¶
func (*FakeSyncer) New ¶
func (f *FakeSyncer) New() client.Object
func (*FakeSyncer) NewList ¶
func (f *FakeSyncer) NewList() client.ObjectList
type SyncTest ¶
type SyncTest struct { Name string InitialPhysicalState []runtime.Object InitialVirtualState []runtime.Object ExpectedPhysicalState map[schema.GroupVersionKind][]runtime.Object ExpectedVirtualState map[schema.GroupVersionKind][]runtime.Object Sync func(ctx context.Context, pClient *testingutil.FakeIndexClient, vClient *testingutil.FakeIndexClient, scheme *runtime.Scheme, log loghelper.Logger) Compare Compare }
Click to show internal directories.
Click to hide internal directories.