Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasDocker ¶
func HasDocker() bool
HasDocker returns true if Docker is available on the local host.
func IsDockerDaemonRunning ¶ added in v0.26.0
func IsDockerDaemonRunning() bool
IsDockerDaemonRunning reports if the Docker daemon is running.
Types ¶
type EmulatorFixture ¶ added in v0.26.0
type EmulatorFixture struct {
// contains filtered or unexported fields
}
EmulatorFixture is a test fixture running the Spanner emulator.
func (*EmulatorFixture) Context ¶ added in v0.26.0
func (fx *EmulatorFixture) Context() context.Context
func (*EmulatorFixture) NewDatabaseFromDDLFiles ¶ added in v0.26.0
NewDatabaseFromDDLFiles creates a new database with a random ID from the provided DDL file path glob.
func (*EmulatorFixture) NewDatabaseFromStatements ¶ added in v0.26.0
func (fx *EmulatorFixture) NewDatabaseFromStatements(t testing.TB, statements []string) *spanner.Client
NewDatabaseFromStatements creates a new database with a random ID from the provided statements.
type Fixture ¶ added in v0.26.0
type Fixture interface { // NewDatabaseFromDLLFiles creates a new database and applies the DDL files from the provided glob. NewDatabaseFromDDLFiles(t testing.TB, globs ...string) *spanner.Client // NewDatabaseFromStatements creates a new database and applies the provided DLL statements. NewDatabaseFromStatements(t testing.TB, statements []string) *spanner.Client }
Fixture is a Spanner test fixture.
func NewEmulatorFixture ¶ added in v0.26.0
NewEmulatorFixture creates a test fixture for a containerized Spanner emulator.
func NewInMemoryFixture ¶ added in v0.26.0
NewInMemoryFixture creates a test fixture for the in-memory Spanner emulator.
type InMemoryFixture ¶ added in v0.26.0
type InMemoryFixture struct {
// contains filtered or unexported fields
}
InMemoryFixture is a test fixture running the Spanner emulator.
func (*InMemoryFixture) NewDatabaseFromDDLFiles ¶ added in v0.26.0
NewDatabaseFromDDLFiles implements Fixture.
func (*InMemoryFixture) NewDatabaseFromStatements ¶ added in v0.26.0
func (fx *InMemoryFixture) NewDatabaseFromStatements(t testing.TB, statements []string) *spanner.Client
NewDatabaseFromDDLFiles implements Fixture.