testingutil

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Integration

func Integration() bool

func MustCloseDB

func MustCloseDB(tb testing.TB, db *litestream.DB)

MustCloseDB closes db and removes its parent directory.

func MustCloseDBs

func MustCloseDBs(tb testing.TB, db *litestream.DB, sqldb *sql.DB)

MustCloseDBs closes db & sqldb and removes the parent directory.

func MustCloseSQLDB

func MustCloseSQLDB(tb testing.TB, d *sql.DB)

MustCloseSQLDB closes a database/sql DB.

func MustDeleteAll

func MustDeleteAll(tb testing.TB, c litestream.ReplicaClient)

MustDeleteAll deletes all objects under the client's path.

func MustOpenDB

func MustOpenDB(tb testing.TB) *litestream.DB

MustOpenDB returns a new instance of a DB.

func MustOpenDBAt

func MustOpenDBAt(tb testing.TB, path string) *litestream.DB

MustOpenDBAt returns a new instance of a DB for a given path.

func MustOpenDBs

func MustOpenDBs(tb testing.TB) (*litestream.DB, *sql.DB)

MustOpenDBs returns a new instance of a DB & associated SQL DB.

func MustOpenSQLDB

func MustOpenSQLDB(tb testing.TB, path string) *sql.DB

MustOpenSQLDB returns a database/sql DB.

func NewABSReplicaClient

func NewABSReplicaClient(tb testing.TB) *abs.ReplicaClient

NewABSReplicaClient returns a new client for integration testing.

func NewDB

func NewDB(tb testing.TB, path string) *litestream.DB

func NewFileReplicaClient

func NewFileReplicaClient(tb testing.TB) *file.ReplicaClient

NewFileReplicaClient returns a new client for integration testing.

func NewGSReplicaClient

func NewGSReplicaClient(tb testing.TB) *gs.ReplicaClient

NewGSReplicaClient returns a new client for integration testing.

func NewNATSReplicaClient

func NewNATSReplicaClient(tb testing.TB) *nats.ReplicaClient

NewNATSReplicaClient returns a new client for integration testing.

func NewReplicaClient

func NewReplicaClient(tb testing.TB, typ string) litestream.ReplicaClient

NewReplicaClient returns a new client for integration testing by type name.

func NewS3ReplicaClient

func NewS3ReplicaClient(tb testing.TB) *s3.ReplicaClient

NewS3ReplicaClient returns a new client for integration testing.

func NewSFTPReplicaClient

func NewSFTPReplicaClient(tb testing.TB) *sftp.ReplicaClient

NewSFTPReplicaClient returns a new client for integration testing.

func ReplicaClientTypes

func ReplicaClientTypes() []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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