Documentation ¶
Index ¶
- Variables
- func CheckMinServerServerVersion(conn driver.Conn, major, minor, patch uint64) bool
- func ClientOptionsFromEnv(env ClickHouseTestEnvironment, settings clickhouse.Settings, useHTTP bool) clickhouse.Options
- func CreateDatabase(testSet string) error
- func GetClickHouseTestVersion() string
- func GetConnection(testSet string, settings clickhouse.Settings, tlsConfig *tls.Config, ...) (driver.Conn, error)
- func GetConnectionWithOptions(options *clickhouse.Options) (driver.Conn, error)
- func GetEnv(key, fallback string) string
- func IsSetInEnv(key string) bool
- func OptionsToDSN(o *clickhouse.Options) string
- func PrintMemUsage()
- func RandAsciiString(n int) string
- func RandIPv4() net.IP
- func RandIPv6() net.IP
- func RandIntString(n int) string
- func Runtime(m *testing.M, ts string) (exitCode int)
- func SetTestEnvironment(testSet string, environment ClickHouseTestEnvironment)
- func SkipOnCloud(t *testing.T, reasons ...string)
- func TestClientDefaultSettings(env ClickHouseTestEnvironment) clickhouse.Settings
- func TestClientWithDefaultOptions(env ClickHouseTestEnvironment, settings clickhouse.Settings) (driver.Conn, error)
- func TestClientWithDefaultSettings(env ClickHouseTestEnvironment) (driver.Conn, error)
- func TestDatabaseSQLClientWithDefaultOptions(env ClickHouseTestEnvironment, settings clickhouse.Settings) (*sql.DB, error)
- func TestDatabaseSQLClientWithDefaultSettings(env ClickHouseTestEnvironment) (*sql.DB, error)
- type ClickHouseTestEnvironment
- type NginxReverseHTTPProxyTestEnvironment
- type TinyProxyTestEnvironment
Constants ¶
This section is empty.
Variables ¶
View Source
var CloudClickHouse = false
View Source
var LocalClickHouse = false
View Source
var RemoteClickHouse = false
Functions ¶
func ClientOptionsFromEnv ¶
func ClientOptionsFromEnv(env ClickHouseTestEnvironment, settings clickhouse.Settings, useHTTP bool) clickhouse.Options
func CreateDatabase ¶
func GetClickHouseTestVersion ¶
func GetClickHouseTestVersion() string
func GetConnection ¶
func IsSetInEnv ¶
func OptionsToDSN ¶
func OptionsToDSN(o *clickhouse.Options) string
func PrintMemUsage ¶
func PrintMemUsage()
PrintMemUsage outputs the current, total and OS memory being used. As well as the number of garage collection cycles completed. thanks to https://golangcode.com/print-the-current-memory-usage/
func RandAsciiString ¶
func RandIntString ¶
func SetTestEnvironment ¶
func SetTestEnvironment(testSet string, environment ClickHouseTestEnvironment)
func SkipOnCloud ¶
func TestClientDefaultSettings ¶
func TestClientDefaultSettings(env ClickHouseTestEnvironment) clickhouse.Settings
func TestClientWithDefaultOptions ¶
func TestClientWithDefaultOptions(env ClickHouseTestEnvironment, settings clickhouse.Settings) (driver.Conn, error)
func TestClientWithDefaultSettings ¶
func TestClientWithDefaultSettings(env ClickHouseTestEnvironment) (driver.Conn, error)
func TestDatabaseSQLClientWithDefaultOptions ¶
func TestDatabaseSQLClientWithDefaultOptions(env ClickHouseTestEnvironment, settings clickhouse.Settings) (*sql.DB, error)
func TestDatabaseSQLClientWithDefaultSettings ¶
func TestDatabaseSQLClientWithDefaultSettings(env ClickHouseTestEnvironment) (*sql.DB, error)
Types ¶
type ClickHouseTestEnvironment ¶
type ClickHouseTestEnvironment struct { Port int HttpPort int SslPort int HttpsPort int Host string Username string Password string Database string Version proto.Version ContainerIP string Container testcontainers.Container `json:"-"` }
func CreateClickHouseTestEnvironment ¶
func CreateClickHouseTestEnvironment(testSet string) (ClickHouseTestEnvironment, error)
func GetExternalTestEnvironment ¶
func GetExternalTestEnvironment(testSet string) (ClickHouseTestEnvironment, error)
func GetTestEnvironment ¶
func GetTestEnvironment(testSet string) (ClickHouseTestEnvironment, error)
type NginxReverseHTTPProxyTestEnvironment ¶
type NginxReverseHTTPProxyTestEnvironment struct { HttpPort int NginxContainer testcontainers.Container `json:"-"` }
func CreateNginxReverseProxyTestEnvironment ¶
func CreateNginxReverseProxyTestEnvironment(clickhouseEnv ClickHouseTestEnvironment) (NginxReverseHTTPProxyTestEnvironment, error)
type TinyProxyTestEnvironment ¶
type TinyProxyTestEnvironment struct { HttpPort int Container testcontainers.Container `json:"-"` }
func CreateTinyProxyTestEnvironment ¶
func CreateTinyProxyTestEnvironment(t *testing.T) (TinyProxyTestEnvironment, error)
Click to show internal directories.
Click to hide internal directories.