Documentation
¶
Index ¶
- Variables
- type Container
- func (p *Container) Address() string
- func (p *Container) CreateSnapshot(ctx context.Context) error
- func (p *Container) DSN() string
- func (p *Container) RestoreSnapshot(ctx context.Context) error
- func (p *Container) Sql() *sql.DB
- func (p *Container) Stop(t *testing.T)
- func (p *Container) StopWithCtx(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultPostgresImage = "docker.io/postgres:14.19-alpine"
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct {
*dbutils.DatabaseTest
// contains filtered or unexported fields
}
func New ¶
func New(t *testing.T, opts ...testcontainers.ContainerCustomizer) *Container
func NewWithCtx ¶ added in v0.5.1
func NewWithCtx(ctx context.Context, opts ...testcontainers.ContainerCustomizer) (*Container, error)
func (*Container) CreateSnapshot ¶ added in v0.4.0
func (*Container) RestoreSnapshot ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.