tests

package
v2.23.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 30 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CloudClickHouse = false
View Source
var LocalClickHouse = false
View Source
var RemoteClickHouse = false

Functions

func CheckMinServerServerVersion added in v2.4.0

func CheckMinServerServerVersion(conn driver.Conn, major, minor, patch uint64) bool

func ClientOptionsFromEnv added in v2.10.0

func ClientOptionsFromEnv(env ClickHouseTestEnvironment, settings clickhouse.Settings) clickhouse.Options

func CreateDatabase added in v2.4.0

func CreateDatabase(testSet string) error

func GetClickHouseTestVersion added in v2.4.0

func GetClickHouseTestVersion() string

func GetConnection added in v2.4.0

func GetConnection(testSet string, settings clickhouse.Settings, tlsConfig *tls.Config, compression *clickhouse.Compression) (driver.Conn, error)

func GetConnectionWithOptions added in v2.4.0

func GetConnectionWithOptions(options *clickhouse.Options) (driver.Conn, error)

func GetEnv added in v2.4.0

func GetEnv(key, fallback string) string

func IsSetInEnv added in v2.4.0

func IsSetInEnv(key string) bool

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 RandAsciiString(n int) string

func RandIPv4

func RandIPv4() net.IP

func RandIPv6

func RandIPv6() net.IP

func RandIntString

func RandIntString(n int) string

func Runtime added in v2.23.1

func Runtime(m *testing.M, ts string) (exitCode int)

func SetTestEnvironment added in v2.4.0

func SetTestEnvironment(testSet string, environment ClickHouseTestEnvironment)

func SkipOnCloud added in v2.20.0

func SkipOnCloud(t *testing.T, reasons ...string)

func TestClientDefaultSettings added in v2.22.3

func TestClientDefaultSettings(env ClickHouseTestEnvironment) clickhouse.Settings

func TestClientWithDefaultSettings added in v2.10.0

func TestClientWithDefaultSettings(env ClickHouseTestEnvironment) (driver.Conn, error)

func TestDatabaseSQLClientWithDefaultOptions added in v2.22.3

func TestDatabaseSQLClientWithDefaultOptions(env ClickHouseTestEnvironment, settings clickhouse.Settings) (*sql.DB, error)

func TestDatabaseSQLClientWithDefaultSettings added in v2.22.3

func TestDatabaseSQLClientWithDefaultSettings(env ClickHouseTestEnvironment) (*sql.DB, error)

Types

type ClickHouseTestEnvironment added in v2.4.0

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 added in v2.4.0

func CreateClickHouseTestEnvironment(testSet string) (ClickHouseTestEnvironment, error)

func GetExternalTestEnvironment added in v2.4.0

func GetExternalTestEnvironment(testSet string) (ClickHouseTestEnvironment, error)

func GetTestEnvironment added in v2.4.0

func GetTestEnvironment(testSet string) (ClickHouseTestEnvironment, error)

type NginxReverseHTTPProxyTestEnvironment added in v2.8.0

type NginxReverseHTTPProxyTestEnvironment struct {
	HttpPort       int
	NginxContainer testcontainers.Container `json:"-"`
}

func CreateNginxReverseProxyTestEnvironment added in v2.8.0

func CreateNginxReverseProxyTestEnvironment(clickhouseEnv ClickHouseTestEnvironment) (NginxReverseHTTPProxyTestEnvironment, error)

type TinyProxyTestEnvironment added in v2.9.2

type TinyProxyTestEnvironment struct {
	HttpPort  int
	Container testcontainers.Container `json:"-"`
}

func CreateTinyProxyTestEnvironment added in v2.9.2

func CreateTinyProxyTestEnvironment(t *testing.T) (TinyProxyTestEnvironment, error)

func (TinyProxyTestEnvironment) ProxyUrl added in v2.9.2

func (e TinyProxyTestEnvironment) ProxyUrl(t *testing.T) string

Directories

Path Synopsis
issues
209
360
470
476
484
485

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL