Documentation ¶
Overview ¶
Package gctest contains testing helpers.
Index ¶
- func Context(db zdb.DB) context.Context
- func DB(t testing.TB) context.Context
- func DBFile(t testing.TB) context.Context
- func Reset()
- func Site(ctx context.Context, t *testing.T, site *goatcounter.Site, ...) context.Context
- func StoreHits(ctx context.Context, t *testing.T, wantFail bool, hits ...goatcounter.Hit) []goatcounter.Hit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DBFile ¶
DBFile is like DB(), but guarantees that the database will be written to disk, whereas DB() may store it in memory.
You can get the connection string from the GCTEST_CONNECT environment variable.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.