fvtests

package
v1.11.0-cni-plu...-8f3027a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2024 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StateRecorder

type StateRecorder struct {
	L sync.Mutex
	// contains filtered or unexported fields
}

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) KVs

func (r *StateRecorder) KVs() map[string]api.Update

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL