gctest

package
v1.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2020 License: EUPL-1.2, ISC, MIT, + 1 more Imports: 18 Imported by: 0

Documentation

Overview

Package gctest contains testing helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DB

func DB(t tester) (context.Context, func())

DB starts a new database test.

func StoreHits

func StoreHits(ctx context.Context, t *testing.T, wantFail bool, hits ...goatcounter.Hit) []goatcounter.Hit

StoreHits is a convenient helper to store hits in the DB via Memstore and cron.UpdateStats().

func SwapNow

func SwapNow(t *testing.T, date interface{}) func()

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL