Documentation ¶
Index ¶
- Variables
- func Attribute[V any](context Context, key string, value V)
- func GetAttribute[V any](context Context, key string) V
- func WithPostgresVersionCheck(version version.PostgresVersion) testConfigurator
- func WithSetup(fn func(ctx SetupContext) error) testConfigurator
- func WithTearDown(fn func(ctx Context) error) testConfigurator
- func WithTimescaleVersionCheck(version version.TimescaleVersion) testConfigurator
- type ContainerLogForwarder
- type Context
- type PrivilegedContext
- type SetupContext
- type TestRunner
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSkipTest = &skipTestError{msg: "Test skipped"}
Functions ¶
func GetAttribute ¶
func WithPostgresVersionCheck ¶ added in v0.12.0
func WithPostgresVersionCheck( version version.PostgresVersion, ) testConfigurator
func WithSetup ¶
func WithSetup( fn func(ctx SetupContext) error, ) testConfigurator
func WithTearDown ¶
func WithTimescaleVersionCheck ¶ added in v0.12.0
func WithTimescaleVersionCheck( version version.TimescaleVersion, ) testConfigurator
Types ¶
type ContainerLogForwarder ¶
func (*ContainerLogForwarder) Accept ¶
func (c *ContainerLogForwarder) Accept( log testcontainers.Log, )
type Context ¶
type Context interface { PrivilegedContext PrivilegedContext( fn func(context PrivilegedContext) error, ) error CreateHypertable( timeDimension string, chunkSize time.Duration, columns ...inttest.Column, ) (string, string, error) CreateVanillaTable( columns ...inttest.Column, ) (string, string, error) PauseReplicator() error ResumeReplicator() error PostgresqlVersion() version.PostgresVersion TimescaleVersion() version.TimescaleVersion // contains filtered or unexported methods }
type PrivilegedContext ¶
type PrivilegedContext interface { Exec( ctx context.Context, sql string, arguments ...any, ) (pgconn.CommandTag, error) Query( ctx context.Context, sql string, args ...any, ) (pgx.Rows, error) QueryRow( ctx context.Context, sql string, args ...any, ) pgx.Row SendBatch( context.Context, *pgx.Batch, ) pgx.BatchResults CopyFrom( context.Context, pgx.Identifier, []string, pgx.CopyFromSource, ) (int64, error) Begin( ctx context.Context, ) (pgx.Tx, error) BeginTx( ctx context.Context, txOptions pgx.TxOptions, ) (pgx.Tx, error) Ping( ctx context.Context, ) error }
type SetupContext ¶
type SetupContext interface { Context AddSystemConfigConfigurator( fn func(config *sysconfig.SystemConfig), ) }
type TestRunner ¶
func (*TestRunner) RunTest ¶
func (tr *TestRunner) RunTest( testFn func(context Context) error, configurators ...testConfigurator, )
func (*TestRunner) SetupSuite ¶
func (tr *TestRunner) SetupSuite()
func (*TestRunner) TearDownSuite ¶
func (tr *TestRunner) TearDownSuite()
Click to show internal directories.
Click to hide internal directories.