From e3bb0899708b8fd52b40548b7cc4f5c45df805d7 Mon Sep 17 00:00:00 2001 From: "bodong.ybd" Date: Mon, 15 Jul 2024 11:38:35 +0800 Subject: [PATCH] chore: change name to resp-compatibility --- .github/workflows/4.0.yaml | 4 ++-- .github/workflows/5.0.yaml | 4 ++-- .github/workflows/6.0.yaml | 4 ++-- .github/workflows/6.2.yaml | 4 ++-- .github/workflows/7.0.yaml | 4 ++-- .github/workflows/7.2.yaml | 4 ++-- .github/workflows/unstable.yaml | 4 ++-- README-CN.md | 12 ++++++------ README.md | 12 ++++++------ redis_compatibility_test.py => resp_compatibility.py | 12 ++++++------ 10 files changed, 32 insertions(+), 32 deletions(-) rename redis_compatibility_test.py => resp_compatibility.py (95%) diff --git a/.github/workflows/4.0.yaml b/.github/workflows/4.0.yaml index 2301b76..8b8bfc5 100644 --- a/.github/workflows/4.0.yaml +++ b/.github/workflows/4.0.yaml @@ -39,7 +39,7 @@ jobs: run: pip install -r requirements.txt - 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 run: | @@ -47,7 +47,7 @@ jobs: 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 + 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 run: | diff --git a/.github/workflows/5.0.yaml b/.github/workflows/5.0.yaml index 8094801..c240990 100644 --- a/.github/workflows/5.0.yaml +++ b/.github/workflows/5.0.yaml @@ -38,7 +38,7 @@ jobs: run: pip install -r requirements.txt - 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 run: | @@ -46,7 +46,7 @@ jobs: 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 + 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 run: | diff --git a/.github/workflows/6.0.yaml b/.github/workflows/6.0.yaml index 84cd22e..2bdc21b 100644 --- a/.github/workflows/6.0.yaml +++ b/.github/workflows/6.0.yaml @@ -38,7 +38,7 @@ jobs: run: pip install -r requirements.txt - 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 run: | @@ -46,7 +46,7 @@ jobs: 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 + 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 run: | diff --git a/.github/workflows/6.2.yaml b/.github/workflows/6.2.yaml index 572bbaa..6110161 100644 --- a/.github/workflows/6.2.yaml +++ b/.github/workflows/6.2.yaml @@ -38,7 +38,7 @@ jobs: run: pip install -r requirements.txt - 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 run: | @@ -46,7 +46,7 @@ jobs: 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 + 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 run: | diff --git a/.github/workflows/7.0.yaml b/.github/workflows/7.0.yaml index 8bb8a71..35f3ec1 100644 --- a/.github/workflows/7.0.yaml +++ b/.github/workflows/7.0.yaml @@ -38,7 +38,7 @@ jobs: run: pip install -r requirements.txt - 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 run: | @@ -46,7 +46,7 @@ jobs: 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 + 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 run: | diff --git a/.github/workflows/7.2.yaml b/.github/workflows/7.2.yaml index 22e1523..b927912 100644 --- a/.github/workflows/7.2.yaml +++ b/.github/workflows/7.2.yaml @@ -38,7 +38,7 @@ jobs: run: pip install -r requirements.txt - 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 run: | @@ -46,7 +46,7 @@ jobs: 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 + 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 run: | diff --git a/.github/workflows/unstable.yaml b/.github/workflows/unstable.yaml index 3bd52f9..728a870 100644 --- a/.github/workflows/unstable.yaml +++ b/.github/workflows/unstable.yaml @@ -37,7 +37,7 @@ jobs: run: pip install -r requirements.txt - 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 run: | @@ -45,7 +45,7 @@ jobs: 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 + run: python resp_compatibility.py --testfile cts.json --port 30001 --cluster --show-failed > cluster.result - name: check cluster fail tests run: | diff --git a/README-CN.md b/README-CN.md index c149c59..264efea 100644 --- a/README-CN.md +++ b/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 版本并显示失败的测试。 ``` -$ 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 test: del command passed test: unlink command passed @@ -42,12 +42,12 @@ test: xtrim command with MINID/LIMIT passed -------- The result of tests -------- 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 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 test: del 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` 选项来生成和此[网站](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. start test Redis for version 4.0.0 connecting to 127.0.0.1:6379 using standalone client diff --git a/README.md b/README.md index ec17ce7..15a4cb7 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# compatibility-test-suite-for-redis +# resp-compatibility [![4.0](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/4.0.yaml/badge.svg)](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/4.0.yaml) [![5.0](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/5.0.yaml/badge.svg)](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/5.0.yaml) [![6.0](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/6.0.yaml/badge.svg)](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/6.0.yaml) [![6.2](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/6.2.yaml/badge.svg)](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/6.2.yaml) [![7.0](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/7.0.yaml/badge.svg)](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/7.0.yaml) [![7.2](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/7.2.yaml/badge.svg)](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/7.2.yaml) [![unstable](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/unstable.yaml/badge.svg)](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) # Install @@ -35,7 +35,7 @@ optional arguments: ``` 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 test: del command passed test: unlink command passed @@ -44,12 +44,12 @@ test: xtrim command with MINID/LIMIT passed -------- The result of tests -------- 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 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 test: del command passed test: unlink command passed @@ -62,7 +62,7 @@ Summary: version: 6.2.0, total tests: 260, passed: 260, rate: 100.00% ## 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. ``` -$ 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. start test Redis for version 4.0.0 connecting to 127.0.0.1:6379 using standalone client diff --git a/redis_compatibility_test.py b/resp_compatibility.py similarity index 95% rename from redis_compatibility_test.py rename to resp_compatibility.py index 28697c3..e470350 100644 --- a/redis_compatibility_test.py +++ b/resp_compatibility.py @@ -16,16 +16,16 @@ EXAMPLE = """ Examples: 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 - 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 - 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 - 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(): - parser = argparse.ArgumentParser(prog="redis_compatibility_test", - description="redis_compatibility_test is used to test whether your redis-like " + parser = argparse.ArgumentParser(prog=" resp_compatibility", + description=" resp_compatibility is used to test whether your redis-like " "database is compatible with Redis versions (such as 6.0, 7.0, etc.)", formatter_class=argparse.RawDescriptionHelpFormatter, epilog=EXAMPLE)