savepointertest

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestSavepointer

func TestSavepointer(t *testing.T, savepointer savepointers.Savepointer, db *sql.DB)

TestSavepointer tests the given Savepointer using the given ready-to-use *sql.DB e.g. Ping() should already have been called on the *sql.DB The caller is responsible for closing the *sql.DB

func TestSavepointerWithDocker

func TestSavepointerWithDocker(t *testing.T, savepointer savepointers.Savepointer, imageNames []string,
	opts dktest.Options, dbGetter DBGetter)

TestSavepointerWithDocker tests the given Savepointer using the given Docker images and options

Types

type DBGetter

type DBGetter func(context.Context, dktest.ContainerInfo) (*sql.DB, error)

DBGetter is a function that gets a ready-to-use SQL DB using the given ContainerInfo. e.g. Ping() should be called by the DBGetter before returning the *sql.DB. The caller is responsible for closing the DB.

func (DBGetter) ReadyFunc

func (g DBGetter) ReadyFunc() func(context.Context, dktest.ContainerInfo) bool

ReadyFunc converts the DBGetter to dktest compatible ReadyFunc

Jump to

Keyboard shortcuts

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