Documentation
¶
Index ¶
- func CompareSQLStrings(actual, expected string) error
- func GetTestConfig() *config.Config
- func NewTestServer() *testServer
- func WithProvider(p testcontainers.ProviderType) testcontainers.CustomizeRequestOption
- type ClickHouseServer
- func (c *ClickHouseServer) CreateAllDatabasesAndRunMigrations(ctx context.Context) error
- func (c *ClickHouseServer) CreateDatabase(ctx context.Context, dbName string) error
- func (c *ClickHouseServer) CreateDatabasesAndRunMigrations(ctx context.Context, databases ...string) error
- func (c *ClickHouseServer) DropDatabase(ctx context.Context, dbName string) error
- func (c *ClickHouseServer) Exec(ctx context.Context, sql string) error
- func (c *ClickHouseServer) GetConnection(ctx context.Context) (driver.Conn, error)
- func (c *ClickHouseServer) GetDSN(ctx context.Context, dbName string) (string, error)
- type MinioFixture
- func (f *MinioFixture) DownloadAllFiles(t *testing.T, ctx context.Context, bucket string) map[string][]byte
- func (f *MinioFixture) ListObjects(t *testing.T, ctx context.Context, bucket string) []string
- func (f *MinioFixture) MakeBucket(t *testing.T, ctx context.Context, bucket string)
- func (f *MinioFixture) SetAWSEnvVars(t *testing.T)
- func (f *MinioFixture) UploadFile(t *testing.T, ctx context.Context, bucket, key string, data []byte)
- type OidcServer
- type ProgrammableHTTPServer
- func (phs *ProgrammableHTTPServer) GetRequests(method, path string) []*http.Request
- func (phs *ProgrammableHTTPServer) ServerURL() string
- func (phs *ProgrammableHTTPServer) SetResponse(method, path string, status int, body string)
- func (phs *ProgrammableHTTPServer) SetResponseFunc(method, path string, f func(*http.Request) (int, string))
- func (phs *ProgrammableHTTPServer) Start()
- func (phs *ProgrammableHTTPServer) Stop()
- type ReplyT
- type SyncBuffer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareSQLStrings ¶
For two SQL strings, this function does a line-by-line comparison while also normalizing any whitespace to avoid auto-formatting differences such as the usage of tabs vs spaces which can vary across development setups across contributors/developers.
Returns no error if they're equal, fails with an error otherwise.
func GetTestConfig ¶
func NewTestServer ¶
func NewTestServer() *testServer
func WithProvider ¶
func WithProvider(p testcontainers.ProviderType) testcontainers.CustomizeRequestOption
Types ¶
type ClickHouseServer ¶
type ClickHouseServer struct {
*testcontainersCH.ClickHouseContainer
}
func NewClickHouseServer ¶
func NewClickHouseServer(ctx context.Context) (*ClickHouseServer, error)
func (*ClickHouseServer) CreateAllDatabasesAndRunMigrations ¶
func (c *ClickHouseServer) CreateAllDatabasesAndRunMigrations(ctx context.Context) error
func (*ClickHouseServer) CreateDatabase ¶
func (c *ClickHouseServer) CreateDatabase(ctx context.Context, dbName string) error
func (*ClickHouseServer) CreateDatabasesAndRunMigrations ¶
func (c *ClickHouseServer) CreateDatabasesAndRunMigrations(ctx context.Context, databases ...string) error
func (*ClickHouseServer) DropDatabase ¶
func (c *ClickHouseServer) DropDatabase(ctx context.Context, dbName string) error
func (*ClickHouseServer) Exec ¶
func (c *ClickHouseServer) Exec(ctx context.Context, sql string) error
func (*ClickHouseServer) GetConnection ¶
type MinioFixture ¶
func NewMinioServer ¶
func NewMinioServer(t *testing.T, ctx context.Context) *MinioFixture
func (*MinioFixture) DownloadAllFiles ¶
func (*MinioFixture) ListObjects ¶
func (*MinioFixture) MakeBucket ¶
func (*MinioFixture) SetAWSEnvVars ¶
func (f *MinioFixture) SetAWSEnvVars(t *testing.T)
func (*MinioFixture) UploadFile ¶
type OidcServer ¶
func NewOIDCServer ¶
func NewOIDCServer(listeningPort *int, privateKeyFilePath *string) (*OidcServer, error)
func (*OidcServer) Close ¶
func (s *OidcServer) Close()
type ProgrammableHTTPServer ¶
type ProgrammableHTTPServer struct {
// contains filtered or unexported fields
}
func NewProgrammableHTTPServer ¶
func NewProgrammableHTTPServer( logger *uberzap.SugaredLogger, credentials string, ) *ProgrammableHTTPServer
func (*ProgrammableHTTPServer) GetRequests ¶
func (phs *ProgrammableHTTPServer) GetRequests(method, path string) []*http.Request
func (*ProgrammableHTTPServer) ServerURL ¶
func (phs *ProgrammableHTTPServer) ServerURL() string
func (*ProgrammableHTTPServer) SetResponse ¶
func (phs *ProgrammableHTTPServer) SetResponse(method, path string, status int, body string)
func (*ProgrammableHTTPServer) SetResponseFunc ¶
func (*ProgrammableHTTPServer) Start ¶
func (phs *ProgrammableHTTPServer) Start()
func (*ProgrammableHTTPServer) Stop ¶
func (phs *ProgrammableHTTPServer) Stop()
type SyncBuffer ¶
type SyncBuffer struct {
// contains filtered or unexported fields
}
func (*SyncBuffer) String ¶
func (s *SyncBuffer) String() string
Click to show internal directories.
Click to hide internal directories.