Documentation ¶
Overview ¶
fv_tests contains a suite of tests that test multiple packages together. In particular, we start a real server and snapshot cache in-process and make loop-back connections to it.
Index ¶
- type StateRecorder
- func (r *StateRecorder) BlockAfterNUpdates(n int, duration time.Duration)
- func (r *StateRecorder) KVCompareFn(kvs map[string]api.Update) func() error
- func (r *StateRecorder) KVs() map[string]api.Update
- func (r *StateRecorder) Len() int
- func (r *StateRecorder) Loop(ctx context.Context)
- func (r *StateRecorder) OnStatusUpdated(status api.SyncStatus)
- func (r *StateRecorder) OnUpdates(updates []api.Update)
- func (r *StateRecorder) Status() api.SyncStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StateRecorder ¶
stateRecorder is our mock client callback, it records the updates it receives in a map. When accessed via methods, all fields are protected by a mutex so it can be used with this construction:
Eventually(recorder.State).Should(Equal(...))
func NewRecorder ¶
func NewRecorder() *StateRecorder
func NewRecorderChanSize ¶
func NewRecorderChanSize(n int) *StateRecorder
func (*StateRecorder) BlockAfterNUpdates ¶
func (r *StateRecorder) BlockAfterNUpdates(n int, duration time.Duration)
func (*StateRecorder) KVCompareFn ¶
func (r *StateRecorder) KVCompareFn(kvs map[string]api.Update) func() error
func (*StateRecorder) Len ¶
func (r *StateRecorder) Len() int
Len returns the number of KVs that we've recorded.
func (*StateRecorder) Loop ¶
func (r *StateRecorder) Loop(ctx context.Context)
func (*StateRecorder) OnStatusUpdated ¶
func (r *StateRecorder) OnStatusUpdated(status api.SyncStatus)
func (*StateRecorder) OnUpdates ¶
func (r *StateRecorder) OnUpdates(updates []api.Update)
func (*StateRecorder) Status ¶
func (r *StateRecorder) Status() api.SyncStatus
Click to show internal directories.
Click to hide internal directories.