package testdb
import "github.com/google/trillian/storage/testdb"
Package testdb creates new databases for tests.
Index ¶
- Constants
- func MySQLAvailable() bool
- func NewTrillianDB(ctx context.Context) (*sql.DB, func(context.Context), error)
- func SetFDLimit(uLimit uint64) error
- func SkipIfNoMySQL(t *testing.T)
Constants ¶
const ( // MySQLURIEnv is the name of the ENV variable checked for the test MySQL // instance URI to use. The value must have a trailing slash. MySQLURIEnv = "TEST_MYSQL_URI" )
Functions ¶
func MySQLAvailable ¶
func MySQLAvailable() bool
MySQLAvailable indicates whether the configured MySQL database is available.
func NewTrillianDB ¶
NewTrillianDB creates an empty database with the Trillian schema. The database name is randomly generated. NewTrillianDB is equivalent to Default().NewTrillianDB(ctx).
func SetFDLimit ¶
SetFDLimit sets the soft limit on the maximum number of open file descriptors. See http://man7.org/linux/man-pages/man2/setrlimit.2.html
func SkipIfNoMySQL ¶
SkipIfNoMySQL is a test helper that skips tests that require a local MySQL.
Source Files ¶
- Version
- v1.3.13
- Published
- Feb 16, 2021
- Platform
- js/wasm
- Imports
- 14 packages
- Last checked
- 2 hours ago –
Tools for package owners.