Documentation
¶
Index ¶
- func LocationLockIndex(lines []string, locationID string) int
- func NewFilesystemAdapter(t testing.TB) *storage.FilesystemAdapter
- func NewSQLiteClient(t testing.TB) (context.Context, *ent.Client)
- func NewSQLiteFilesystem(t testing.TB) (context.Context, *ent.Client, *storage.FilesystemAdapter)
- func RequireLocationLockedBeforeCacheEntryWrites(t testing.TB, lines []string, locationID string)
- func ShutdownCacheServiceOnCleanup(tb testing.TB, service cacheService)
- type JWKS
- type StatementLog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LocationLockIndex ¶
LocationLockIndex returns the index of the first UPDATE of storage_locations bound to locationID, or -1.
func NewFilesystemAdapter ¶
func NewFilesystemAdapter(t testing.TB) *storage.FilesystemAdapter
func NewSQLiteFilesystem ¶
func RequireLocationLockedBeforeCacheEntryWrites ¶
RequireLocationLockedBeforeCacheEntryWrites asserts that locationID's row lock (an UPDATE of storage_locations) precedes the first cache_entries write. Lines have ent's debug format, e.g. "Tx(<id>).Exec: query=UPDATE `storage_locations` SET ... args=[1 <locationID>]".
func ShutdownCacheServiceOnCleanup ¶
ShutdownCacheServiceOnCleanup stops the service's background writers before the database and temp dirs are torn down.
Types ¶
type StatementLog ¶
type StatementLog struct {
// contains filtered or unexported fields
}
StatementLog records the statements ent's debug driver reports, in order.
func NewRecordingSQLiteClient ¶
NewRecordingSQLiteClient opens a migrated SQLite database through ent's debug driver so tests can assert statement order.
func (*StatementLog) Lines ¶
func (l *StatementLog) Lines() []string
func (*StatementLog) Reset ¶
func (l *StatementLog) Reset()