You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: .github/CONTRIBUTING.md
+41
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,47 @@ Jedis unit tests use many Redis instances, so we use a ```Makefile``` to prepare
25
25
Start unit tests with ```make test```.
26
26
Set up test environments with ```make start```, tear down those environments with ```make stop``` and clean up the environment files with ```make cleanup```.
27
27
28
+
29
+
# Jedis Test Environment Using Docker
30
+
31
+
This guide explains how to bootstrap and manage a test environment for Jedis using Docker Compose.
32
+
33
+
## Workflow Steps
34
+
1.**Bring up the test environment** (examples provided below).
35
+
2.**Run tests** (via IDE, Maven, etc.).
36
+
3.**Destroy the test environment** using `docker compose down`.
37
+
38
+
### Important Note
39
+
The default test environment uses the temporary work folder `./redis-env-work`.
40
+
Some tests might leave Redis nodes in an inconsistent state, so this folder should be cleaned or removed before bootstrapping the environment again.
41
+
42
+
43
+
## Bootstrap test env using Docker
44
+
-**Redis 8.0-M01**
45
+
```
46
+
rm -rf ./redis-env-work
47
+
export REDIS_VERSION=8.0-M01
48
+
docker compose --env-file src/test/resources/env/.env -f src/test/resources/env/docker-compose.yml up
49
+
```
50
+
-**Redis 7.4.1**
51
+
```
52
+
rm -rf ./redis-env-work
53
+
export REDIS_VERSION=7.4.1
54
+
docker compose --env-file src/test/resources/env/.env -f src/test/resources/env/docker-compose.yml up
55
+
```
56
+
-**Redis 7.2.6**
57
+
```
58
+
rm -rf ./redis-env-work
59
+
export REDIS_VERSION=7.2.6
60
+
docker compose --env-file src/test/resources/env/.env -f src/test/resources/env/docker-compose.yml up
61
+
```
62
+
-**Redis 6.2.16**
63
+
-**NOTE :** 6.2.16 uses a dedicated .env.v6.12.16 file, since some of the redis configuration settings are not supported in 6.2.16
64
+
```
65
+
rm -rf ./redis-env-work
66
+
docker compose --env-file src/test/resources/env/.env.v6.12.16 -f src/test/resources/env/docker-compose.yml up
0 commit comments