Documentation
¶
Index ¶
- Constants
- Variables
- func AddDataNode1(db *pgx.Conn, database string) error
- func AddDataNode2(db *pgx.Conn, database string) error
- func DbSetup(DBName string, superuser SuperuserStatus, deferNode2Setup bool, ...) (*pgxpool.Pool, error)
- func GetReadOnlyConnection(t testing.TB, DBName string) *pgxpool.Pool
- func MakePromUserPromAdmin(t testing.TB, dbName string)
- func PgConnectURL(dbName string, superuser SuperuserStatus) string
- func PgConnectURLUser(dbName string, user string) string
- func PgxPoolWithRegisteredTypes(connectURL string) (*pgxpool.Pool, error)
- func PgxPoolWithRole(t testing.TB, dbName string, role string) *pgxpool.Pool
- func PrintContainerLogs(container testcontainers.Container)
- func StartConnectorWithImage(ctx context.Context, dbContainer testcontainers.Container, image string, ...) (testcontainers.Container, error)
- func StartDatabaseImage(ctx context.Context, t Result, image string, testDataDir string, ...) (testcontainers.Container, io.Closer, error)
- func StartPGContainer(ctx context.Context, t Result, extensionState TestOptions, testDataDir string, ...) (testcontainers.Container, io.Closer, error)
- func StartPromContainer(storagePath string, ctx context.Context) (testcontainers.Container, string, nat.Port, error)
- func StopContainer(ctx context.Context, container testcontainers.Container, printLogs bool, ...)
- func TempDir(name string) (string, error)
- func WithDB(t testing.TB, DBName string, superuser SuperuserStatus, deferNode2Setup bool, ...)
- type CloseAll
- type JaegerContainer
- type OptionState
- type Result
- type SuperuserStatus
- type TestOptions
- func (e TestOptions) GetDockerImageName() string
- func (e *TestOptions) SetTimescaleDockerImage(timescaleDockerImage string)
- func (e TestOptions) TryGetDockerImagePgVersion() (string, error)
- func (e *TestOptions) UseMultinode()
- func (e *TestOptions) UseTimescaleDB()
- func (e *TestOptions) UseTimescaleNightly()
- func (e *TestOptions) UseTimescaleNightlyMultinode()
- func (e TestOptions) UsesMultinode() bool
- func (e TestOptions) UsesTimescaleDB() bool
- func (e TestOptions) UsesTimescaleNightly() bool
Constants ¶
View Source
const ( Superuser = true NoSuperuser = false )
Variables ¶
View Source
var ConnectorPort = nat.Port("9201/tcp")
Functions ¶
func AddDataNode1 ¶
func AddDataNode2 ¶
func DbSetup ¶
func DbSetup(DBName string, superuser SuperuserStatus, deferNode2Setup bool, extensionState TestOptions) (*pgxpool.Pool, error)
func MakePromUserPromAdmin ¶
func PgConnectURL ¶
func PgConnectURL(dbName string, superuser SuperuserStatus) string
func PgConnectURLUser ¶
func PrintContainerLogs ¶
func PrintContainerLogs(container testcontainers.Container)
func StartConnectorWithImage ¶
func StartDatabaseImage ¶
func StartPGContainer ¶
func StartPGContainer( ctx context.Context, t Result, extensionState TestOptions, testDataDir string, printLogs bool, ) (testcontainers.Container, io.Closer, error)
StartPGContainer starts a postgreSQL container for use in testing
func StartPromContainer ¶
func StartPromContainer(storagePath string, ctx context.Context) (testcontainers.Container, string, nat.Port, error)
StartPromContainer starts a Prometheus container for use in testing
func StopContainer ¶
Types ¶
type JaegerContainer ¶
type JaegerContainer struct { Container testcontainers.Container GrpcReceivingPort, UIPort nat.Port // contains filtered or unexported fields }
func StartJaegerContainer ¶
func StartJaegerContainer(printLogs bool) (jaegerContainer *JaegerContainer, err error)
func (*JaegerContainer) Close ¶
func (c *JaegerContainer) Close() error
type OptionState ¶
type OptionState int
const ( Timescale OptionState = timescaleBit Multinode OptionState = timescaleBit | multinodeBit TimescaleNightly OptionState = timescaleBit | timescaleNightlyBit TimescaleNightlyMultinode OptionState = timescaleBit | multinodeBit | timescaleNightlyBit )
type SuperuserStatus ¶
type SuperuserStatus = bool
type TestOptions ¶
type TestOptions struct {
// contains filtered or unexported fields
}
func NewTestOptions ¶
func NewTestOptions(options OptionState, timescaleDockerImage string) TestOptions
func (TestOptions) GetDockerImageName ¶
func (e TestOptions) GetDockerImageName() string
func (*TestOptions) SetTimescaleDockerImage ¶
func (e *TestOptions) SetTimescaleDockerImage(timescaleDockerImage string)
func (TestOptions) TryGetDockerImagePgVersion ¶
func (e TestOptions) TryGetDockerImagePgVersion() (string, error)
func (*TestOptions) UseMultinode ¶
func (e *TestOptions) UseMultinode()
func (*TestOptions) UseTimescaleDB ¶
func (e *TestOptions) UseTimescaleDB()
func (*TestOptions) UseTimescaleNightly ¶
func (e *TestOptions) UseTimescaleNightly()
func (*TestOptions) UseTimescaleNightlyMultinode ¶
func (e *TestOptions) UseTimescaleNightlyMultinode()
func (TestOptions) UsesMultinode ¶
func (e TestOptions) UsesMultinode() bool
func (TestOptions) UsesTimescaleDB ¶
func (e TestOptions) UsesTimescaleDB() bool
func (TestOptions) UsesTimescaleNightly ¶
func (e TestOptions) UsesTimescaleNightly() bool
Click to show internal directories.
Click to hide internal directories.