Skip to content

Commit

Permalink
Merge pull request #18 from tair-opensource/feature-cluster
Browse files Browse the repository at this point in the history
Support cluster test
  • Loading branch information
yangbodong22011 authored Aug 30, 2023
2 parents 90ae83d + 73284e3 commit 38df86f
Show file tree
Hide file tree
Showing 11 changed files with 1,837 additions and 253 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/4.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v3
- name: clone and build redis
run: |
sudo apt-get install git
sudo apt-get install git ruby
git clone https://github.com/redis/redis
cd redis
git checkout 4.0
Expand All @@ -23,6 +23,13 @@ jobs:
run: |
./redis/src/redis-server &
- name: start redis cluster
run: |
sudo gem install redis
cd redis/utils/create-cluster
./create-cluster start
echo yes|./create-cluster create
- name: set up python
uses: actions/setup-python@v4
with:
Expand All @@ -38,3 +45,11 @@ jobs:
run: |
cat test.result
grep -q "This is failed tests for" test.result && exit -1 || exit 0
- name: run cluster test
run: python redis_compatibility_test.py --testfile cts.json --port 30001 --specific-version 4.0.0 --cluster --show-failed > cluster.result

- name: check cluster fail tests
run: |
cat cluster.result
grep -q "This is failed tests for" cluster.result && exit -1 || exit 0
14 changes: 14 additions & 0 deletions .github/workflows/5.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ jobs:
run: |
./redis/src/redis-server &
- name: start redis cluster
run: |
cd redis/utils/create-cluster
./create-cluster start
echo yes|./create-cluster create
- name: set up python
uses: actions/setup-python@v4
with:
Expand All @@ -38,3 +44,11 @@ jobs:
run: |
cat test.result
grep -q "This is failed tests for" test.result && exit -1 || exit 0
- name: run cluster test
run: python redis_compatibility_test.py --testfile cts.json --port 30001 --specific-version 5.0.0 --cluster --show-failed > cluster.result

- name: check cluster fail tests
run: |
cat cluster.result
grep -q "This is failed tests for" cluster.result && exit -1 || exit 0
14 changes: 14 additions & 0 deletions .github/workflows/6.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ jobs:
run: |
./redis/src/redis-server &
- name: start redis cluster
run: |
cd redis/utils/create-cluster
./create-cluster start
echo yes|./create-cluster create
- name: set up python
uses: actions/setup-python@v4
with:
Expand All @@ -38,3 +44,11 @@ jobs:
run: |
cat test.result
grep -q "This is failed tests for" test.result && exit -1 || exit 0
- name: run cluster test
run: python redis_compatibility_test.py --testfile cts.json --port 30001 --specific-version 6.0.0 --cluster --show-failed > cluster.result

- name: check cluster fail tests
run: |
cat cluster.result
grep -q "This is failed tests for" cluster.result && exit -1 || exit 0
14 changes: 14 additions & 0 deletions .github/workflows/6.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ jobs:
run: |
./redis/src/redis-server &
- name: start redis cluster
run: |
cd redis/utils/create-cluster
./create-cluster start
echo yes|./create-cluster create
- name: set up python
uses: actions/setup-python@v4
with:
Expand All @@ -38,3 +44,11 @@ jobs:
run: |
cat test.result
grep -q "This is failed tests for" test.result && exit -1 || exit 0
- name: run cluster test
run: python redis_compatibility_test.py --testfile cts.json --port 30001 --specific-version 6.2.0 --cluster --show-failed > cluster.result

- name: check cluster fail tests
run: |
cat cluster.result
grep -q "This is failed tests for" cluster.result && exit -1 || exit 0
14 changes: 14 additions & 0 deletions .github/workflows/7.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ jobs:
run: |
./redis/src/redis-server &
- name: start redis cluster
run: |
cd redis/utils/create-cluster
./create-cluster start
echo yes|./create-cluster create
- name: set up python
uses: actions/setup-python@v4
with:
Expand All @@ -38,3 +44,11 @@ jobs:
run: |
cat test.result
grep -q "This is failed tests for" test.result && exit -1 || exit 0
- name: run cluster test
run: python redis_compatibility_test.py --testfile cts.json --port 30001 --specific-version 7.0.0 --cluster --show-failed > cluster.result

- name: check cluster fail tests
run: |
cat cluster.result
grep -q "This is failed tests for" cluster.result && exit -1 || exit 0
14 changes: 14 additions & 0 deletions .github/workflows/7.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ jobs:
run: |
./redis/src/redis-server &
- name: start redis cluster
run: |
cd redis/utils/create-cluster
./create-cluster start
echo yes|./create-cluster create
- name: set up python
uses: actions/setup-python@v4
with:
Expand All @@ -38,3 +44,11 @@ jobs:
run: |
cat test.result
grep -q "This is failed tests for" test.result && exit -1 || exit 0
- name: run cluster test
run: python redis_compatibility_test.py --testfile cts.json --port 30001 --specific-version 7.2.0 --cluster --show-failed > cluster.result

- name: check cluster fail tests
run: |
cat cluster.result
grep -q "This is failed tests for" cluster.result && exit -1 || exit 0
14 changes: 14 additions & 0 deletions .github/workflows/unstable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ jobs:
run: |
./redis/src/redis-server &
- name: start redis cluster
run: |
cd redis/utils/create-cluster
./create-cluster start
echo yes|./create-cluster create
- name: set up python
uses: actions/setup-python@v4
with:
Expand All @@ -37,3 +43,11 @@ jobs:
run: |
cat test.result
grep -q "This is failed tests for" test.result && exit -1 || exit 0
- name: run cluster test
run: python redis_compatibility_test.py --testfile cts.json --port 30001 --cluster --show-failed > cluster.result

- name: check cluster fail tests
run: |
cat cluster.result
grep -q "This is failed tests for" cluster.result && exit -1 || exit 0
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ optional arguments:
--port PORT the redis port
--password PASSWORD the redis password
--testfile TESTFILE the redis compatibility test cases
--specific-version {1.0.0, 2.8.0, 3.2.0, 4.0.0, 5.0.0, 6.0.0, 6.2.0, 7.0.0}
--specific-version {1.0.0,2.8.0,3.2.0,4.0.0,5.0.0,6.0.0,6.2.0,7.0.0,7.2.0}
the redis version
--show-failed show details of failed tests
--cluster server is a node of the Redis cluster
--ssl open ssl connection
--genhtml generate test report in html format
```

Examples:
Expand Down
Loading

0 comments on commit 38df86f

Please sign in to comment.