conformance

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 RunActionDeliveries added in v0.7.0

func RunActionDeliveries(t *testing.T, store state.Store)

RunActionDeliveries qualifies persistent metadata export without executing an upstream tool or relying on any external collector.

func RunConnectorActions added in v0.7.0

func RunConnectorActions(t *testing.T, store state.Store)

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

func RunInsertionIdentity(t *testing.T, store state.Store)

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

func RunPendingReviewSecurity(t *testing.T, store state.Store)

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

func RunPendingTenantScope(t *testing.T, s pendingScopeStore)

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.

func RunUsageSnapshots added in v0.8.0

func RunUsageSnapshots(t *testing.T, store state.Store)

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.

type StoreFactory

type StoreFactory func(t *testing.T) state.Store

StoreFactory creates a fresh, initialized Store for each test.

Jump to

Keyboard shortcuts

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