Documentation
¶
Overview ¶
Package storetest holds store conformance tests shared by every backend, so the memory, SQLite, Postgres and MongoDB stores are held to one behavior.
Index ¶
Constants ¶
const Alg = secret.EncryptionAlgorithm
Alg is the algorithm name the version tests record for an encrypted row.
Variables ¶
This section is empty.
Functions ¶
func RunSecretExpiry ¶
func RunSecretExpiry(t *testing.T, newStore ExpiryFactory)
RunSecretExpiry runs the expiry-filter conformance tests against the store newStore builds. One store is seeded once and every case reads from it.
func RunTenantIsolation ¶
func RunTenantIsolation(t *testing.T, newStore TenantFactory)
RunTenantIsolation runs the cross-tenant isolation conformance tests against the store newStore builds. The app and two tenants each hold a secret under one key, and no read, write or delete under one of them may reach another's.
func RunVersionEncryption ¶
func RunVersionEncryption(t *testing.T, newStore VersionEncryptionFactory)
RunVersionEncryption runs the version-encryption conformance tests against the store newStore builds.
Types ¶
type ExpiryFactory ¶
ExpiryFactory returns a fresh, empty secret store.
type TenantFactory ¶
TenantFactory returns a fresh, empty secret store.
type VersionEncryptionFactory ¶
type VersionEncryptionFactory func(t *testing.T) (s secret.Store, legacy func(key, appID string, version int64))
VersionEncryptionFactory returns a fresh, empty store plus a legacy function. legacy rewrites one version row the way a row written before the encryption_alg column looks: its algorithm unset (NULL or absent), not "".