@@ -31,41 +31,39 @@ Set up test environments with ```make start```, tear down those environments wit
3131This guide explains how to bootstrap and manage a test environment for Jedis using Docker Compose.
3232
3333## 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 ` .
34+ 1 . ** Start the test environment** by running the following command (examples below).
35+ - For instance, to start the environment with Redis 8.0-M01, use ` make start-test-env ` .
36+ 2 . ** Run tests** through your IDE, Maven, or other testing tools as needed.
37+ 3 . ** Stop the test environment** by running the following command:
38+ - ` make stop-test-env `
39+ - This will stop and tear down the Docker containers running the Redis service
3740
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+ # Start the Test Environment Using Docker
4142
43+ You can bootstrap the test environment for supported versions of Redis using the provided ` make ` targets.
4244
43- ## Bootstrap test env using Docker
44- - ** Redis 8.0-M01**
45+ ## Option 1: Using ` make ` Targets
46+ To bring up the test environment for a specific Redis version (8.0-M01, 7.4.1, 7.2.6, or 6.2.16), use the following command:
47+ ``` bash
48+ make start-test-env version=8.0-M01 # Replace with desired version
4549```
46- rm -rf ./redis-env-work
50+
51+ ## Option 2: Using docker compose commands directly
52+ Docker compose file can be found in ` src/test/resources/env ` folder.
53+ - ** Redis 8.0-M01, 7.4.1, 7.2.6**
54+ ``` bash
55+ rm -rf /tmp/redis-env-work
4756export 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
57+ docker compose up
6158```
6259- ** 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
60+ - ** NOTE:** Redis 6.2.16 uses a dedicated ` .env.v6.2.16 ` .
61+ ``` bash
62+ rm -rf /tmp /redis-env-work
63+ docker compose --env-file .env.v6.2 .16 up
6764```
6865
66+
6967# Some rules of Jedis source code
7068
7169## Code Convention
0 commit comments