- add test support - formatted some code Signed-off-by: Pengda Yang <daz-3ux@proton.me> |
||
---|---|---|
.github/workflows | ||
.gitignore | ||
LICENSE | ||
README.md | ||
cts.json | ||
redis_compatibility_test.py | ||
requirements.txt |
README.md
compatibility-test-suite-for-redis
compatibility-test-suite-for-redis is used to test whether your redis-like database is compatible with Redis versions (such as 6.0, 7.0, etc.)
Install
requires Python 3.7
or later.
pip3 install -r requirements.txt
How to use
optional arguments:
-h, --help show this help message and exit
--host HOST the redis host
--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}
the redis version
--show-failed show details of failed tests
--cluster server is a node of the Redis cluster
--ssl open ssl connection
Examples:
Test whether host:port is compatible with redis 6.2.0 and display failure case:
$ python3 redis_compatibility_test.py -h host -p port --testfile cts.json --specific-version 6.2.0 --show-failed
Connecting to 127.0.0.1:6379 use standalone client
test: del command passed
test: unlink command passed
...
test: rpushx with multiple element passed
-------- The result of tests --------
version: 6.2.0, total tests: 62, passed: 62, rate: 100.0%
More examples are shown python3 redis_compatibility_test.py -h
.