chore: change name to resp-compatibility
This commit is contained in:
parent
61e7e08583
commit
e3bb089970
|
@ -39,7 +39,7 @@ jobs:
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r requirements.txt
|
||||||
|
|
||||||
- name: run test
|
- name: run test
|
||||||
run: python redis_compatibility_test.py --testfile cts.json --specific-version 4.0.0 --show-failed > test.result
|
run: python resp_compatibility.py --testfile cts.json --specific-version 4.0.0 --show-failed > test.result
|
||||||
|
|
||||||
- name: check fail tests
|
- name: check fail tests
|
||||||
run: |
|
run: |
|
||||||
|
@ -47,7 +47,7 @@ jobs:
|
||||||
grep -q "This is failed tests for" test.result && exit -1 || exit 0
|
grep -q "This is failed tests for" test.result && exit -1 || exit 0
|
||||||
|
|
||||||
- name: run cluster test
|
- 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
|
run: python resp_compatibility.py --testfile cts.json --port 30001 --specific-version 4.0.0 --cluster --show-failed > cluster.result
|
||||||
|
|
||||||
- name: check cluster fail tests
|
- name: check cluster fail tests
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -38,7 +38,7 @@ jobs:
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r requirements.txt
|
||||||
|
|
||||||
- name: run test
|
- name: run test
|
||||||
run: python redis_compatibility_test.py --testfile cts.json --specific-version 5.0.0 --show-failed > test.result
|
run: python resp_compatibility.py --testfile cts.json --specific-version 5.0.0 --show-failed > test.result
|
||||||
|
|
||||||
- name: check fail tests
|
- name: check fail tests
|
||||||
run: |
|
run: |
|
||||||
|
@ -46,7 +46,7 @@ jobs:
|
||||||
grep -q "This is failed tests for" test.result && exit -1 || exit 0
|
grep -q "This is failed tests for" test.result && exit -1 || exit 0
|
||||||
|
|
||||||
- name: run cluster test
|
- 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
|
run: python resp_compatibility.py --testfile cts.json --port 30001 --specific-version 5.0.0 --cluster --show-failed > cluster.result
|
||||||
|
|
||||||
- name: check cluster fail tests
|
- name: check cluster fail tests
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -38,7 +38,7 @@ jobs:
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r requirements.txt
|
||||||
|
|
||||||
- name: run test
|
- name: run test
|
||||||
run: python redis_compatibility_test.py --testfile cts.json --specific-version 6.0.0 --show-failed > test.result
|
run: python resp_compatibility.py --testfile cts.json --specific-version 6.0.0 --show-failed > test.result
|
||||||
|
|
||||||
- name: check fail tests
|
- name: check fail tests
|
||||||
run: |
|
run: |
|
||||||
|
@ -46,7 +46,7 @@ jobs:
|
||||||
grep -q "This is failed tests for" test.result && exit -1 || exit 0
|
grep -q "This is failed tests for" test.result && exit -1 || exit 0
|
||||||
|
|
||||||
- name: run cluster test
|
- 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
|
run: python resp_compatibility.py --testfile cts.json --port 30001 --specific-version 6.0.0 --cluster --show-failed > cluster.result
|
||||||
|
|
||||||
- name: check cluster fail tests
|
- name: check cluster fail tests
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -38,7 +38,7 @@ jobs:
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r requirements.txt
|
||||||
|
|
||||||
- name: run test
|
- name: run test
|
||||||
run: python redis_compatibility_test.py --testfile cts.json --specific-version 6.2.0 --show-failed > test.result
|
run: python resp_compatibility.py --testfile cts.json --specific-version 6.2.0 --show-failed > test.result
|
||||||
|
|
||||||
- name: check fail tests
|
- name: check fail tests
|
||||||
run: |
|
run: |
|
||||||
|
@ -46,7 +46,7 @@ jobs:
|
||||||
grep -q "This is failed tests for" test.result && exit -1 || exit 0
|
grep -q "This is failed tests for" test.result && exit -1 || exit 0
|
||||||
|
|
||||||
- name: run cluster test
|
- 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
|
run: python resp_compatibility.py --testfile cts.json --port 30001 --specific-version 6.2.0 --cluster --show-failed > cluster.result
|
||||||
|
|
||||||
- name: check cluster fail tests
|
- name: check cluster fail tests
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -38,7 +38,7 @@ jobs:
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r requirements.txt
|
||||||
|
|
||||||
- name: run test
|
- name: run test
|
||||||
run: python redis_compatibility_test.py --testfile cts.json --specific-version 7.0.0 --show-failed > test.result
|
run: python resp_compatibility.py --testfile cts.json --specific-version 7.0.0 --show-failed > test.result
|
||||||
|
|
||||||
- name: check fail tests
|
- name: check fail tests
|
||||||
run: |
|
run: |
|
||||||
|
@ -46,7 +46,7 @@ jobs:
|
||||||
grep -q "This is failed tests for" test.result && exit -1 || exit 0
|
grep -q "This is failed tests for" test.result && exit -1 || exit 0
|
||||||
|
|
||||||
- name: run cluster test
|
- 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
|
run: python resp_compatibility.py --testfile cts.json --port 30001 --specific-version 7.0.0 --cluster --show-failed > cluster.result
|
||||||
|
|
||||||
- name: check cluster fail tests
|
- name: check cluster fail tests
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -38,7 +38,7 @@ jobs:
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r requirements.txt
|
||||||
|
|
||||||
- name: run test
|
- name: run test
|
||||||
run: python redis_compatibility_test.py --testfile cts.json --specific-version 7.2.0 --show-failed > test.result
|
run: python resp_compatibility.py --testfile cts.json --specific-version 7.2.0 --show-failed > test.result
|
||||||
|
|
||||||
- name: check fail tests
|
- name: check fail tests
|
||||||
run: |
|
run: |
|
||||||
|
@ -46,7 +46,7 @@ jobs:
|
||||||
grep -q "This is failed tests for" test.result && exit -1 || exit 0
|
grep -q "This is failed tests for" test.result && exit -1 || exit 0
|
||||||
|
|
||||||
- name: run cluster test
|
- 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
|
run: python resp_compatibility.py --testfile cts.json --port 30001 --specific-version 7.2.0 --cluster --show-failed > cluster.result
|
||||||
|
|
||||||
- name: check cluster fail tests
|
- name: check cluster fail tests
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -37,7 +37,7 @@ jobs:
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r requirements.txt
|
||||||
|
|
||||||
- name: run test
|
- name: run test
|
||||||
run: python redis_compatibility_test.py --testfile cts.json --show-failed > test.result
|
run: python resp_compatibility.py --testfile cts.json --show-failed > test.result
|
||||||
|
|
||||||
- name: check fail tests
|
- name: check fail tests
|
||||||
run: |
|
run: |
|
||||||
|
@ -45,7 +45,7 @@ jobs:
|
||||||
grep -q "This is failed tests for" test.result && exit -1 || exit 0
|
grep -q "This is failed tests for" test.result && exit -1 || exit 0
|
||||||
|
|
||||||
- name: run cluster test
|
- name: run cluster test
|
||||||
run: python redis_compatibility_test.py --testfile cts.json --port 30001 --cluster --show-failed > cluster.result
|
run: python resp_compatibility.py --testfile cts.json --port 30001 --cluster --show-failed > cluster.result
|
||||||
|
|
||||||
- name: check cluster fail tests
|
- name: check cluster fail tests
|
||||||
run: |
|
run: |
|
||||||
|
|
12
README-CN.md
12
README-CN.md
|
@ -1,6 +1,6 @@
|
||||||
# compatibility-test-suite-for-redis
|
# resp-compatibility
|
||||||
|
|
||||||
`compatibility-test-suite-for-redis`是一个用来检测你的`Redis-Like`系统兼容到开源`Redis`哪个版本的工具(6.0还是7.0等)。
|
` resp-compatibility`是一个用来检测你的`Redis-Like`系统兼容到开源`Redis`哪个版本的工具(6.0还是7.0等)。
|
||||||
|
|
||||||
# 安装
|
# 安装
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ optional arguments:
|
||||||
```
|
```
|
||||||
例如,测试 host:port 对应的服务是否兼容 Redis 6.2.0 版本并显示失败的测试。
|
例如,测试 host:port 对应的服务是否兼容 Redis 6.2.0 版本并显示失败的测试。
|
||||||
```
|
```
|
||||||
$ python3 redis_compatibility_test.py -h host -p port --testfile cts.json --specific-version 6.2.0 --show-failed
|
$ python3 resp_compatibility.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
|
Connecting to 127.0.0.1:6379 use standalone client
|
||||||
test: del command passed
|
test: del command passed
|
||||||
test: unlink command passed
|
test: unlink command passed
|
||||||
|
@ -42,12 +42,12 @@ test: xtrim command with MINID/LIMIT passed
|
||||||
-------- The result of tests --------
|
-------- The result of tests --------
|
||||||
Summary: version: 6.2.0, total tests: 285, passed: 285, rate: 100.00%
|
Summary: version: 6.2.0, total tests: 285, passed: 285, rate: 100.00%
|
||||||
```
|
```
|
||||||
更多的示例请参考 `python3 redis_compatibility_test.py -h`。
|
更多的示例请参考 `python3 resp_compatibility.py -h`。
|
||||||
|
|
||||||
## cluster
|
## cluster
|
||||||
Redis 在 API 层面有两种模式,一个是`Standalone`(Sentinel 模式的 API 兼容性和 Standalone 是一样的),一个是`Cluster`。命令在`Standalone`模式下没有跨 Slot 的限制,但是在集群模式下,要求多 key 的命令(例如 mset/mget命令)必须在同一 Slot 中。因此,我们支持了`--cluster`这个选项来测试系统对于 `Redis Cluster` 模式的兼容性,用法如下:
|
Redis 在 API 层面有两种模式,一个是`Standalone`(Sentinel 模式的 API 兼容性和 Standalone 是一样的),一个是`Cluster`。命令在`Standalone`模式下没有跨 Slot 的限制,但是在集群模式下,要求多 key 的命令(例如 mset/mget命令)必须在同一 Slot 中。因此,我们支持了`--cluster`这个选项来测试系统对于 `Redis Cluster` 模式的兼容性,用法如下:
|
||||||
```
|
```
|
||||||
$ python3.9 redis_compatibility_test.py --testfile cts.json --host 127.0.0.1 --port 30001 --cluster --specific-version 6.2.0
|
$ python3.9 resp_compatibility.py --testfile cts.json --host 127.0.0.1 --port 30001 --cluster --specific-version 6.2.0
|
||||||
connecting to 127.0.0.1:30001 use cluster client
|
connecting to 127.0.0.1:30001 use cluster client
|
||||||
test: del command passed
|
test: del command passed
|
||||||
test: unlink command passed
|
test: unlink command passed
|
||||||
|
@ -60,7 +60,7 @@ Summary: version: 6.2.0, total tests: 260, passed: 260, rate: 100.00%
|
||||||
## genhtml
|
## genhtml
|
||||||
您可以使用 `--genhtml` 选项来生成和此[网站](https://tair-opensource.github.io/compatibility-test-suite-for-redis/)相同的 html 报告。 请注意,当使用此选项时候,将会读取 [config.yaml](config.yaml) 文件中的配置进行测试,此时命令行中的 `specific-version` 将会被文件中的覆盖。
|
您可以使用 `--genhtml` 选项来生成和此[网站](https://tair-opensource.github.io/compatibility-test-suite-for-redis/)相同的 html 报告。 请注意,当使用此选项时候,将会读取 [config.yaml](config.yaml) 文件中的配置进行测试,此时命令行中的 `specific-version` 将会被文件中的覆盖。
|
||||||
```
|
```
|
||||||
$ python3.9 redis_compatibility_test.py --testfile cts.json --genhtml --show-failed
|
$ python3.9 resp_compatibility.py --testfile cts.json --genhtml --show-failed
|
||||||
directory html already exists, will be deleted and renewed.
|
directory html already exists, will be deleted and renewed.
|
||||||
start test Redis for version 4.0.0
|
start test Redis for version 4.0.0
|
||||||
connecting to 127.0.0.1:6379 using standalone client
|
connecting to 127.0.0.1:6379 using standalone client
|
||||||
|
|
12
README.md
12
README.md
|
@ -1,8 +1,8 @@
|
||||||
# compatibility-test-suite-for-redis
|
# resp-compatibility
|
||||||
|
|
||||||
[](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/4.0.yaml) [](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/5.0.yaml) [](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/6.0.yaml) [](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/6.2.yaml) [](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/7.0.yaml) [](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/7.2.yaml) [](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/unstable.yaml)
|
[](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/4.0.yaml) [](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/5.0.yaml) [](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/6.0.yaml) [](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/6.2.yaml) [](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/7.0.yaml) [](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/7.2.yaml) [](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/unstable.yaml)
|
||||||
|
|
||||||
compatibility-test-suite-for-redis(CTS) is used to test whether your redis-like database is compatible with Redis versions (such as
|
resp-compatibility is used to test whether your redis-like database is compatible with Redis versions (such as
|
||||||
6.0, 7.0, etc.) [中文文档](README-CN.md)
|
6.0, 7.0, etc.) [中文文档](README-CN.md)
|
||||||
|
|
||||||
# Install
|
# Install
|
||||||
|
@ -35,7 +35,7 @@ optional arguments:
|
||||||
```
|
```
|
||||||
e.g. Test whether host:port is compatible with redis 6.2.0 and display failure case:
|
e.g. 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
|
$ python3 resp_compatibility.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
|
Connecting to 127.0.0.1:6379 use standalone client
|
||||||
test: del command passed
|
test: del command passed
|
||||||
test: unlink command passed
|
test: unlink command passed
|
||||||
|
@ -44,12 +44,12 @@ test: xtrim command with MINID/LIMIT passed
|
||||||
-------- The result of tests --------
|
-------- The result of tests --------
|
||||||
Summary: version: 6.2.0, total tests: 285, passed: 285, rate: 100.00%
|
Summary: version: 6.2.0, total tests: 285, passed: 285, rate: 100.00%
|
||||||
```
|
```
|
||||||
More examples are shown `python3 redis_compatibility_test.py -h`.
|
More examples are shown `python3 resp_compatibility.py -h`.
|
||||||
|
|
||||||
## cluster
|
## cluster
|
||||||
Redis has two modes from the API level, namely `Standalone` (Sentinel has no API restrictions like Standalone) and `Cluster`, where the command support of Standalone does not require Cross slot, but Cluster restricts multi-key commands to be executed in the same slot (e.g. mset/mget ), therefore, we support `--cluster` to test the compatibility of cluster mode, you can test your Redis Cluster cluster compatibility as follows:
|
Redis has two modes from the API level, namely `Standalone` (Sentinel has no API restrictions like Standalone) and `Cluster`, where the command support of Standalone does not require Cross slot, but Cluster restricts multi-key commands to be executed in the same slot (e.g. mset/mget ), therefore, we support `--cluster` to test the compatibility of cluster mode, you can test your Redis Cluster cluster compatibility as follows:
|
||||||
```
|
```
|
||||||
$ python3.9 redis_compatibility_test.py --testfile cts.json --host 127.0.0.1 --port 30001 --cluster --specific-version 6.2.0
|
$ python3.9 resp_compatibility.py --testfile cts.json --host 127.0.0.1 --port 30001 --cluster --specific-version 6.2.0
|
||||||
connecting to 127.0.0.1:30001 use cluster client
|
connecting to 127.0.0.1:30001 use cluster client
|
||||||
test: del command passed
|
test: del command passed
|
||||||
test: unlink command passed
|
test: unlink command passed
|
||||||
|
@ -62,7 +62,7 @@ Summary: version: 6.2.0, total tests: 260, passed: 260, rate: 100.00%
|
||||||
## genhtml
|
## genhtml
|
||||||
You can use `--genhtml` to generate a test report similar to the html of this [website](https://tair-opensource.github.io/compatibility-test-suite-for-redis/). It should be noted that this option will read the configuration in [config.yaml](config.yaml) for testing. Special attention needs to be paid, at this time the `specific-version` specified in your command line will be overwritten by the one in the configuration file.
|
You can use `--genhtml` to generate a test report similar to the html of this [website](https://tair-opensource.github.io/compatibility-test-suite-for-redis/). It should be noted that this option will read the configuration in [config.yaml](config.yaml) for testing. Special attention needs to be paid, at this time the `specific-version` specified in your command line will be overwritten by the one in the configuration file.
|
||||||
```
|
```
|
||||||
$ python3.9 redis_compatibility_test.py --testfile cts.json --genhtml --show-failed
|
$ python3.9 resp_compatibility.py --testfile cts.json --genhtml --show-failed
|
||||||
directory html already exists, will be deleted and renewed.
|
directory html already exists, will be deleted and renewed.
|
||||||
start test Redis for version 4.0.0
|
start test Redis for version 4.0.0
|
||||||
connecting to 127.0.0.1:6379 using standalone client
|
connecting to 127.0.0.1:6379 using standalone client
|
||||||
|
|
|
@ -16,16 +16,16 @@ EXAMPLE = """
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
Run tests without specifying a version
|
Run tests without specifying a version
|
||||||
python3 redis_compatibility_test.py --testfile cts.json
|
python3 resp_compatibility.py --testfile cts.json
|
||||||
|
|
||||||
Run the test for compatibility with Redis 6.2.0
|
Run the test for compatibility with Redis 6.2.0
|
||||||
python3 redis_compatibility_test.py --testfile cts.json --specific-version 6.2.0
|
python3 resp_compatibility.py --testfile cts.json --specific-version 6.2.0
|
||||||
|
|
||||||
Run the test whether it is compatible with Redis 6.2.0, and print the failure case
|
Run the test whether it is compatible with Redis 6.2.0, and print the failure case
|
||||||
python3 redis_compatibility_test.py --testfile cts.json --specific-version 6.2.0 --show-failed
|
python3 resp_compatibility.py --testfile cts.json --specific-version 6.2.0 --show-failed
|
||||||
|
|
||||||
Run the test for redis cluster
|
Run the test for redis cluster
|
||||||
python3 redis_compatibility_test.py --testfile cts.json --host 127.0.0.1 --port 30001 --cluster
|
python3 resp_compatibility.py --testfile cts.json --host 127.0.0.1 --port 30001 --cluster
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@ -329,8 +329,8 @@ def create_client(host, port, password, ssl, cluster):
|
||||||
|
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
parser = argparse.ArgumentParser(prog="redis_compatibility_test",
|
parser = argparse.ArgumentParser(prog=" resp_compatibility",
|
||||||
description="redis_compatibility_test is used to test whether your redis-like "
|
description=" resp_compatibility is used to test whether your redis-like "
|
||||||
"database is compatible with Redis versions (such as 6.0, 7.0, etc.)",
|
"database is compatible with Redis versions (such as 6.0, 7.0, etc.)",
|
||||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||||
epilog=EXAMPLE)
|
epilog=EXAMPLE)
|
Loading…
Reference in New Issue