Documentation
¶
Index ¶
- func CapturePodLogs(ctx context.Context, config *rest.Config, namespace, pod string) error
- func GetFreePort() (int, error)
- func GetNonEmptyLines(output string) []string
- func GetProjectDir() (string, error)
- func InstallCertManager(ctx context.Context) error
- func InstallPrometheusOperator(ctx context.Context) error
- func LoadImageToKindClusterWithName(ctx context.Context, name string) error
- func Run(cmd *exec.Cmd) ([]byte, error)
- func SetupCA(ctx context.Context, k8sClient client.Client, namespace string, suffix uint32)
- func UninstallPrometheusOperator(ctx context.Context)
- func WaitReplicaCount(ctx context.Context, k8sClient client.Client, namespace, app string, ...) error
- type ClickHouseClient
- func (c *ClickHouseClient) CheckDefaultDatabasesReplicated(ctx context.Context) error
- func (c *ClickHouseClient) CheckRead(ctx context.Context, order int) error
- func (c *ClickHouseClient) CheckWrite(ctx context.Context, order int) error
- func (c *ClickHouseClient) Close()
- func (c *ClickHouseClient) CreateDatabase(ctx context.Context) error
- func (c *ClickHouseClient) QueryRow(ctx context.Context, query string, result any) error
- type ForwardedCluster
- type KeeperClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CapturePodLogs ¶
CapturePodLogs streams the logs of the given pod to the GinkgoWriter until the context is cancelled.
func GetNonEmptyLines ¶
GetNonEmptyLines converts given command output string into individual objects according to line breakers, and ignores the empty elements in it.
func GetProjectDir ¶
GetProjectDir will return the directory where the project is.
func InstallCertManager ¶
InstallCertManager installs the cert manager bundle.
func InstallPrometheusOperator ¶
InstallPrometheusOperator installs the prometheus Operator to be used to export the enabled metrics.
func LoadImageToKindClusterWithName ¶
LoadImageToKindClusterWithName loads a local docker image to the kind cluster.
func UninstallPrometheusOperator ¶
UninstallPrometheusOperator uninstalls the prometheus.
Types ¶
type ClickHouseClient ¶
type ClickHouseClient struct {
// contains filtered or unexported fields
}
ClickHouseClient is a ClickHouse client for testing ClickHouse clusters. Forwards ports to ClickHouse pods.
func NewClickHouseClient ¶
func NewClickHouseClient( ctx context.Context, config *rest.Config, cr *v1.ClickHouseCluster, auth ...clickhouse.Auth, ) (*ClickHouseClient, error)
NewClickHouseClient creates a new ClickHouseClient connected to the specified ClickHouseCluster.
func (*ClickHouseClient) CheckDefaultDatabasesReplicated ¶
func (c *ClickHouseClient) CheckDefaultDatabasesReplicated(ctx context.Context) error
CheckDefaultDatabasesReplicated checks that the default database has Replicated engine on all cluster nodes.
func (*ClickHouseClient) CheckRead ¶
func (c *ClickHouseClient) CheckRead(ctx context.Context, order int) error
CheckRead reads and verifies test data from the ClickHouse cluster.
func (*ClickHouseClient) CheckWrite ¶
func (c *ClickHouseClient) CheckWrite(ctx context.Context, order int) error
CheckWrite writes test data to the ClickHouse cluster.
func (*ClickHouseClient) Close ¶
func (c *ClickHouseClient) Close()
Close closes the ClickHouseClient and releases all resources.
func (*ClickHouseClient) CreateDatabase ¶
func (c *ClickHouseClient) CreateDatabase(ctx context.Context) error
CreateDatabase creates the test database on the ClickHouse cluster.
type ForwardedCluster ¶
type ForwardedCluster struct {
PodToAddr map[*corev1.Pod]string
// contains filtered or unexported fields
}
ForwardedCluster represents a set of port-forwarded pods.
func NewForwardedCluster ¶
func NewForwardedCluster(ctx context.Context, config *rest.Config, namespace, app string, port uint16, ) (*ForwardedCluster, error)
NewForwardedCluster creates a new ForwardedCluster by port-forwarding all pods with the given app label.
func (*ForwardedCluster) Close ¶
func (c *ForwardedCluster) Close()
Close stops all port-forwarding.
type KeeperClient ¶
type KeeperClient struct {
// contains filtered or unexported fields
}
KeeperClient is a ZooKeeper client for testing Keeper clusters. Forwards ports to Keeper pods.
func NewKeeperClient ¶
func NewKeeperClient(ctx context.Context, config *rest.Config, cr *v1.KeeperCluster) (*KeeperClient, error)
NewKeeperClient creates a new KeeperClient connected to the specified KeeperCluster.
func (*KeeperClient) CheckRead ¶
func (c *KeeperClient) CheckRead(order int) error
CheckRead reads and verifies test data from the Keeper cluster.
func (*KeeperClient) CheckWrite ¶
func (c *KeeperClient) CheckWrite(order int) error
CheckWrite writes test data to the Keeper cluster.
func (*KeeperClient) Close ¶
func (c *KeeperClient) Close()
Close closes the KeeperClient and releases all resources.