Documentation
¶
Overview ¶
Package crontest opens the cron store on pgmem, CSF's in-process substitute for PostgreSQL, with CSF's real schema applied: the store a spec grants when it needs cron state without a database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IReporter ¶
type IReporter interface {
Helper()
Fatalf(format string, arguments ...any)
Cleanup(cleanup func())
}
IReporter is the part of a spec runner the store is opened against: GinkgoT() and *testing.T both satisfy it.
type MemoryStore ¶
MemoryStore is the cron store over one pgmem database of its own. Close releases the database.
func OpenMemoryStore ¶
func OpenMemoryStore(ctx context.Context) (*MemoryStore, error)
OpenMemoryStore applies CSF's schema to a new pgmem database and returns the cron store over it.
func OpenStore ¶
func OpenStore(reporter IReporter) *MemoryStore
OpenStore opens a store for one spec and closes it when the spec ends; a store that cannot be opened fails the spec.
func (*MemoryStore) Close ¶
func (store *MemoryStore) Close() error
Close releases the pgmem database.
func (*MemoryStore) Database ¶
func (store *MemoryStore) Database() csfpg.IDB
Database is the csfpg capability the store runs on, for a spec that reads the rows the store wrote.