Skip to content

Commit 20593d7

Browse files
authored
initial commit: added regression tests for Altinity ClickHouse Helm c… (#72)
* initial commit: added regression tests for Altinity ClickHouse Helm charts * feat: add service configuration test for ClickHouse with LoadBalancer. enabled check_persistence_configuration
1 parent 3d7c21e commit 20593d7

File tree

18 files changed

+2450
-0
lines changed

18 files changed

+2450
-0
lines changed

tests/README.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<img align="right" style="width: 5em;" src="https://github.com/user-attachments/assets/1e97270f-7925-4cc2-8791-8d0cc77fe512">
2+
3+
4+
# Regression Tests for Altinity ClickHouse Helm Charts
5+
6+
This repository contains comprehensive regression tests for Altinity ClickHouse Helm charts, ensuring proper deployment and configuration of ClickHouse clusters in Kubernetes environments.
7+
8+
## Table of Contents
9+
10+
* [Supported Environment](#supported-environment)
11+
* [Prerequisites](#prerequisites)
12+
* [Kubernetes Cluster](#kubernetes-cluster)
13+
* [Helm](#helm)
14+
* [Python Modules](#python-modules)
15+
* [How to Run the Tests](#-how-to-run-the-tests)
16+
* [Contributing](#contributing)
17+
18+
19+
## Supported Environment
20+
21+
- [Ubuntu](https://ubuntu.com/) 22.04 / 24.04
22+
- [Python](https://www.python.org/downloads/) >= 3.10.12
23+
- [Kubernetes](https://kubernetes.io/) >= 1.24
24+
- [Helm](https://helm.sh/) >= 3.8.0
25+
- [Minikube](https://minikube.sigs.k8s.io/) >= 1.28.0 (for local testing)
26+
27+
## Prerequisites
28+
29+
To install the necessary prerequisites, follow the instructions below:
30+
31+
### Kubernetes Cluster
32+
33+
You need access to a Kubernetes cluster. For local testing, you can use Minikube:
34+
35+
```bash
36+
# Install Minikube
37+
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
38+
sudo install minikube-linux-amd64 /usr/local/bin/minikube
39+
```
40+
41+
### Helm
42+
43+
To install Helm, follow the instructions below:
44+
45+
```bash
46+
# Install Helm
47+
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
48+
49+
# Verify installation
50+
helm version
51+
```
52+
53+
### Python Modules
54+
55+
To install all necessary Python modules, execute the following command:
56+
57+
```bash
58+
pip3 install -r tests/requirements.txt
59+
```
60+
61+
## How to Run the Tests
62+
63+
To run the tests execute the test script:
64+
65+
```bash
66+
python3 ./tests/run/smoke.py
67+
```
68+
69+
## Contributing
70+
71+
When adding new tests:
72+
73+
1. Follow the existing test structure
74+
2. Add appropriate test steps in the `steps/` directory
75+
3. Ensure tests are idempotent and clean up after themselves
76+
4. Add proper error handling and timeouts
77+

tests/__init__.py

Whitespace-only changes.

tests/helpers/__init__.py

Whitespace-only changes.

tests/helpers/argparser.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import os
2+
from testflows.core import Secret
3+
4+
def argparser(parser):
5+
"""Parse common arguments for the tests."""
6+
7+
parser.add_argument(
8+
"--feature",
9+
metavar="name",
10+
type=str,
11+
help="Test Feature name",
12+
required=False,
13+
)
14+
15+
pass

tests/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
requests==2.32.3
2+
testflows==2.4.13
3+
testflows.texts==2.0.211217.1011222

tests/requirements/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)