2023-09-18 17:06:35 +03:00
# Continuous Tests
1. [Description ](#description )
2. [Prerequisites ](#prerequisites )
3. [Run tests ](#run-tests )
4. [Analyze logs ](#analyze-logs )
## Description
Continuous Tests were developed to perform long lasting tests in different configurations and topologies. Unlike Distributed Tests, they are running continuously, until we stop them manually. Such approach is very useful to detect the issues which may appear over the time when we may have blocking I/O, unclosed pools/connections and etc.
Usually, we are running Continuous Tests manually and for automated runs, please refer to the [Tests automation ](Automation.md ).
2026-04-17 15:03:22 +10:00
There is one project in the repository:
2023-09-18 17:06:35 +03:00
- [ContinuousTests ](../ContinuousTests ) - Continuous Tests
And they are used to prepare environment and run Continuous Tests.
## Prerequisites
1. Kubernetes cluster, to run the tests
2. kubeconfig file, to access the cluster
3. [kubectl ](https://kubernetes.io/docs/tasks/tools/ ) installed, to create resources in the cluster
4. Optional - [OpenLens ](https://github.com/MuhammedKalkan/OpenLens ) installed, to browse cluster resources
## Run tests
1. Create a Pod in the cluster, in the `default` namespace and consider to use your own value for `metadata.name`
< details >
< summary > tests-runner.yaml< / summary >
```yaml
---
apiVersion: v1
kind: Pod
metadata:
name: tests-runner
namespace: default
labels:
name: manual-run
spec:
containers:
- name: runner
2026-04-17 15:03:22 +10:00
image: mcr.microsoft.com/dotnet/sdk:10.0
2023-09-18 17:06:35 +03:00
env:
- name: KUBECONFIG
value: /opt/kubeconfig.yaml
# volumeMounts:
# - name: kubeconfig
# mountPath: /opt/kubeconfig.yaml
# subPath: kubeconfig.yaml
# - name: logs
2026-04-17 15:03:22 +10:00
# mountPath: /var/log/storage-dist-tests
2023-09-18 17:06:35 +03:00
command: ["sleep", "infinity"]
# volumes:
# - name: kubeconfig
# secret:
2026-04-17 15:03:22 +10:00
# secretName: storage-dist-tests-app-kubeconfig
2023-09-18 17:06:35 +03:00
# - name: logs
# hostPath:
2026-04-17 15:03:22 +10:00
# path: /var/log/storage-dist-tests
2023-09-18 17:06:35 +03:00
```
```shell
kubectl apply -f tests-runner.yaml
```
2023-09-20 20:08:11 +03:00
2. Copy kubeconfig to the runner Pod using the name you set in the previous step
2023-09-18 17:06:35 +03:00
```shell
2026-04-17 15:03:22 +10:00
kubectl cp ~/.kube/storage-dist-tests.yaml tests-runner:/opt/kubeconfig.yaml
2023-09-18 17:06:35 +03:00
```
3. Exec into the runner Pod using the name you set in the previous step
```shell
# kubectl
kubectl exec -it tests-runner -- bash
# OpenLens
OpenLens --> Pods --> dist-tests-runner --> "Press on it" --> Pod Shell
```
4. Install required packages
```shell
apt update
2023-09-25 20:04:06 +03:00
apt install -y tmux vim
2023-09-18 17:06:35 +03:00
```
2023-09-20 20:08:11 +03:00
5. Clone Continuous Tests repository
2023-09-18 17:06:35 +03:00
```shell
tmux
cd /opt
2026-04-17 15:03:22 +10:00
git clone https://github.com/logos-storage/logos-storage-dist-tests.git
2023-09-18 17:06:35 +03:00
```
2026-04-17 15:03:22 +10:00
6. Run `ContinuousTests`
2023-09-18 17:06:35 +03:00
```shell
2026-04-17 15:03:22 +10:00
cd ../../Tests/LogosStorageContinuousTests
2023-09-18 17:06:35 +03:00
2023-09-25 20:04:06 +03:00
# Adjust values
vi run.sh
# Run tests
2023-09-18 17:06:35 +03:00
bash run.sh
```
2026-04-17 15:03:22 +10:00
7. [Tmux sessions ](https://tmuxcheatsheet.com )
2023-09-25 20:04:06 +03:00
```shell
# Detach
Ctrl + b --> d
# List
tmux ls
# Attach
tmux a -t 0
```
2023-09-18 17:06:35 +03:00
## Analyze logs
2026-04-17 15:03:22 +10:00
We should check the logs in the `/opt/logos-storage-dist-tests/Tests/LogosStorageContinuousTests/logs` folder