Documentation
¶
Overview ¶
Package conformance provides backend-agnostic test suites for the state.Store interface. Every backend (SQLite, Postgres, MySQL) must pass this suite.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 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 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, error)
}
PendingStore is the SQL approval contract, separate from non-SQL state backends.