Documentation ¶
Index ¶
Constants ¶
const ( Success = "\u2713" Failed = "\u2717" )
Success and failure markers.
Variables ¶
This section is empty.
Functions ¶
func IntPointer ¶
IntPointer is a helper to get a *int from a int. It is in the tests package because we normally don't want to deal with pointers to basic types but it's useful in some tests.
func NewUnit ¶
NewUnit creates a test database inside a Docker container. It creates the required table structure but the database is otherwise empty.
It does not return errors as this is intended for testing only. Instead it will call Fatal on the provided testing.T if anything goes wrong.
It returns the database to use as well as a function to call at the end of the test.
func StringPointer ¶
StringPointer is a helper to get a *string from a string. It is in the tests package because we normally don't want to deal with pointers to basic types but it's useful in some tests.
Types ¶
type Container ¶ added in v0.1.3
type Container struct {
// contains filtered or unexported fields
}
type ContainerSpec ¶ added in v0.1.3
ContainerSpec provides configuration for a docker container to run.
func NewPostgresDBSpec ¶ added in v0.1.3
func NewPostgresDBSpec() ContainerSpec
func NewRoachDBSpec ¶ added in v0.1.3
func NewRoachDBSpec() ContainerSpec
type Test ¶
Test owns state for running and shutting down tests.
func NewIntegration ¶
NewIntegration creates a database, seeds it, constructs an authenticator.