Documentation
¶
Overview ¶
Package conformance provides backend-agnostic test suites for the state.Store interface. Every backend (SQLite, Postgres, MySQL) must pass this suite.
Index ¶
- func RunActionDeliveries(t *testing.T, store state.Store)
- func RunConnectorActions(t *testing.T, store state.Store)
- func RunExactJSONNumberTests(t *testing.T, factory StoreFactory)
- func RunInsertionIdentity(t *testing.T, store state.Store)
- func RunPendingReviewSecurity(t *testing.T, store state.Store)
- func RunPendingSecurity(t *testing.T, s PendingStore)
- func RunPendingTargetRevisionSecurity(t *testing.T, store state.Store, ...)
- func RunPendingTenantScope(t *testing.T, s pendingScopeStore)
- func RunStoreSuite(t *testing.T, factory StoreFactory)
- func RunUsageSnapshots(t *testing.T, store state.Store)
- type PendingStore
- type StoreFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunActionDeliveries ¶ added in v0.7.0
RunActionDeliveries qualifies persistent metadata export without executing an upstream tool or relying on any external collector.
func RunConnectorActions ¶ added in v0.7.0
RunConnectorActions qualifies the optional SQL lifecycle independently of the universal run store. Every effect assertion belongs in the API fixture too.
func RunExactJSONNumberTests ¶
func RunExactJSONNumberTests(t *testing.T, factory StoreFactory)
RunExactJSONNumberTests covers the backends whose JSON storage preserves arbitrary decimal precision. Native MySQL JSON and BSON have their own representable ranges and must reject an unsupported value before writing.
func RunInsertionIdentity ¶ added in v0.7.0
RunInsertionIdentity proves that dispatch receives the identity captured by the original insertion transaction, without a later GetRun race.
func RunPendingReviewSecurity ¶ added in v0.7.0
RunPendingReviewSecurity proves exact reviewer counting and revision-bound authority under the same real SQL transactions used by managed dispatch.
func RunPendingSecurity ¶
func RunPendingSecurity(t *testing.T, s PendingStore)
RunPendingSecurity proves isolation, concurrent dedup and deadline enforcement against a real SQL backend. Every invocation uses independent synthetic IDs.
func RunPendingTargetRevisionSecurity ¶ added in v0.7.0
func RunPendingTargetRevisionSecurity(t *testing.T, store state.Store, mutate func(context.Context, string, string, string) error)
RunPendingTargetRevisionSecurity qualifies target binding in both legacy consume and recorded-action dispatch paths. mutate is test-only SQL used to represent historical rows that a fresh CreatePendingAction now refuses.
func RunPendingTenantScope ¶ added in v0.7.0
RunPendingTenantScope tests the actual SQL predicates, including mutation failures. A request filter cannot turn a scoped context into global authority.
func RunStoreSuite ¶
func RunStoreSuite(t *testing.T, factory StoreFactory)
RunStoreSuite runs all conformance tests.
Types ¶
type PendingStore ¶
type PendingStore interface {
CreatePendingAction(context.Context, *models.PendingAction) error
GetPendingAction(context.Context, string) (*models.PendingAction, error)
SearchPendingActions(context.Context, *models.PendingActionSearchRequest) ([]*models.PendingAction, error)
SetPendingActionApproved(context.Context, string, string) error
ConsumeApprovedAction(context.Context, string, string, string, int64, string, string, string, string, string, string) (string, error)
}
PendingStore is the SQL approval contract, separate from non-SQL state backends.