Documentation
¶
Overview ¶
Package storetest is the behavioral contract shared by every review store. It is test support: production packages must not import it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Harness ¶
type Harness[S Store] struct { Open func(t *testing.T, retention time.Duration) S Owner func(t *testing.T, store S, name string) string // creates an owner, returns its ID Expire func(t *testing.T, store S, contextID string, at time.Time) // sets expiry of every diff of the context (scopes and commits) // Reopen closes store and opens its database again with retention, so // durability and retention changes are observable. Reopen func(t *testing.T, store S, retention time.Duration) S // Submitted sets the context's last submission time, so a retry that // refreshes it is observable within one clock tick. Submitted func(t *testing.T, store S, contextID string, at time.Time) }
Harness opens isolated stores and performs test-only adjustments no application operation may perform.
type Store ¶
type Store interface {
contextservice.Store
reviewservice.CommentStore
reviewservice.MutationStore
reviewservice.CommitStore
PruneExpired(time.Time) error
}
Store is every shared content and review operation both review stores implement.
Click to show internal directories.
Click to hide internal directories.