satellitedbtest

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: AGPL-3.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// DefaultPostgresConn is a connstring that works with docker-compose
	DefaultPostgresConn = "postgres://storj:storj-pass@test-postgres/teststorj?sslmode=disable"
	// DefaultSqliteConn is a connstring that is inmemory
	DefaultSqliteConn = "sqlite3://file::memory:?mode=memory"
)

Variables

View Source
var (
	// TestPostgres is flag for the postgres test database
	TestPostgres = flag.String("postgres-test-db", os.Getenv("STORJ_POSTGRES_TEST"), "PostgreSQL test database connection string")
)

Functions

func Run

func Run(t *testing.T, test func(t *testing.T, db satellite.DB))

Run method will iterate over all supported databases. Will establish connection and will create tables for each DB.

Types

type Database

type Database struct {
	Name    string
	URL     string
	Message string
}

Database describes a test database

func Databases

func Databases() []Database

Databases returns default databases.

Jump to

Keyboard shortcuts

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