Documentation
¶
Overview ¶
Package sqltest provides PostgreSQL for the store contract runs. It starts one container per test binary with testcontainers-go and skips the calling test where Docker cannot run Linux containers (decision 0015), so the suite runs everywhere and the PostgreSQL half runs in the Linux CI jobs. Set ARTIFACTWEAVE_TEST_POSTGRES_DSN to use an existing server instead.
Index ¶
- func IdentityPaging(t *testing.T, s *sqlcommon.Store)
- func PostgresDSN(t *testing.T) string
- func RemoteCachePersistence(t *testing.T, s *sqlcommon.Store, reopen func() *sqlcommon.Store)
- func ReplayCrash(t *testing.T, s *sqlcommon.Store, env []string)
- func ReplayCrashChild(t *testing.T, s *sqlcommon.Store)
- func RepositoryHeaders(t *testing.T, open Opener)
- func RepositoryHeadersMigration(t *testing.T, open Opener)
- func Reset(t *testing.T, db *sql.DB, d sqlcommon.Dialect)
- func Rotation(t *testing.T, open Opener)
- type Opener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IdentityPaging ¶
IdentityPaging exercises small first/late pages over a larger data set and retains the query plan for the name continuation used by ListSummaries.
func PostgresDSN ¶
PostgresDSN returns a DSN for the PostgreSQL server shared by the test binary, or skips t when there is none and Docker cannot run Linux containers.
func RemoteCachePersistence ¶
RemoteCachePersistence exercises upgrading real pre-cache repositories and reopening the backend with completed and in-flight retrieval records.
func ReplayCrash ¶
ReplayCrash kills a separate process after its transactional mutation but before its receipt commits. Both the effect and receipt must roll back.
func ReplayCrashChild ¶
ReplayCrashChild is called only by each backend's subprocess test helper.
func RepositoryHeaders ¶
RepositoryHeaders proves sealing and lifecycle behavior through both SQL backends and exercises the real configuration merge. Resolver revision behavior is covered by remote.TestAccResolverSealedCredentialsAndRotation; importing that service here would cycle through auth's SQL-backed seed tests.
func RepositoryHeadersMigration ¶
RepositoryHeadersMigration upgrades a real version-15 database, preserving legacy values and unrelated document fields while eliminating live plaintext.
func Reset ¶
Reset rolls every migration back and applies them again, leaving an empty schema. Running it before each contract test also exercises every down migration on every run.