storjscandbtest

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: AGPL-3.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, test func(ctx *testcontext.Context, t *testing.T, db *DB))

Run creates new storjscan test database, create tables and execute test function against that db.

Types

type DB

type DB struct {
	*storjscandb.DB
	// contains filtered or unexported fields
}

DB is test storjscan database with unique schema which performs cleanup on close.

func OpenDB

func OpenDB(ctx context.Context, log *zap.Logger, connStr, testName, category string) (*DB, error)

OpenDB opens new unique temp storjscan test database.

func (*DB) Close

func (db *DB) Close() error

Close closes test database and performs cleanup.

Jump to

Keyboard shortcuts

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