storjscandbtest

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: AGPL-3.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Derive added in v1.0.6

Derive derives an account from the master key using the provided path.

func GenerateTestAddresses added in v1.0.6

func GenerateTestAddresses(ctx context.Context, service *wallets.Service, satellite string, count int) error

GenerateTestAddresses create test addresses for the satellite and add them to the wallets service.

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