Documentation
¶
Overview ¶
Package retentiontest holds checks that every retention.Store backend must pass, so the five stores are held to one definition of a purge scope.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PurgeScope ¶
PurgeScope checks that EventsOlderThan matches a purge query's scope exactly. An empty TenantID selects the app's untenanted events and nothing else, and an empty AppID selects events with no app. Neither is a wildcard: a policy saved at app level must not reach into its tenants' history.
s must start empty of events for the IDs used here. run is appended to every app and tenant ID, so backends shared between tests can pass a random value.
Types ¶
type Store ¶
type Store interface {
retention.Store
Append(ctx context.Context, event *audit.Event) error
CreateStream(ctx context.Context, s *stream.Stream) error
}
Store is what PurgeScope needs from a backend: the retention methods under test, plus enough of the event and stream API to seed events.