diff options
author | Chayim <chayim@users.noreply.github.com> | 2021-12-16 09:36:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-16 09:36:56 +0200 |
commit | 18c6809b761bc6755349e1d7e08e74e857ec2c65 (patch) | |
tree | 29ba60b2d00dbc999981e2def8a51fd0a07a9e6a /tasks.py | |
parent | a8b8f142399a62e64c3003adda2d9563eea95ef4 (diff) | |
download | redis-py-18c6809b761bc6755349e1d7e08e74e857ec2c65.tar.gz |
Support for password-encrypted SSL private keys (#1782)
Adding support for SSL private keys with a password. This PR also adds support for future SSL tests.
Diffstat (limited to 'tasks.py')
-rw-r--r-- | tasks.py | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -3,6 +3,11 @@ import shutil from invoke import run, task + +def _generate_keys(): + run("bash docker/stunnel/create_certs.sh") + + with open("tox.ini") as fp: lines = fp.read().split("\n") dockers = [line.split("=")[1].strip() for line in lines if line.find("name") != -1] @@ -14,6 +19,7 @@ def devenv(c): specified in the tox.ini file. """ clean(c) + _generate_keys() cmd = "tox -e devenv" for d in dockers: cmd += f" --docker-dont-stop={d}" @@ -29,6 +35,7 @@ def build_docs(c): @task def linters(c): """Run code linters""" + _generate_keys() run("tox -e linters") @@ -37,6 +44,7 @@ def all_tests(c): """Run all linters, and tests in redis-py. This assumes you have all the python versions specified in the tox.ini file. """ + _generate_keys() linters(c) tests(c) @@ -47,6 +55,7 @@ def tests(c): with and without hiredis. """ print("Starting Redis tests") + _generate_keys() run("tox -e '{standalone,cluster}'-'{plain,hiredis}'") @@ -55,6 +64,7 @@ def standalone_tests(c): """Run all Redis tests against the current python, with and without hiredis.""" print("Starting Redis tests") + _generate_keys() run("tox -e standalone-'{plain,hiredis}'") @@ -63,6 +73,7 @@ def cluster_tests(c): """Run all Redis Cluster tests against the current python, with and without hiredis.""" print("Starting RedisCluster tests") + _generate_keys() run("tox -e cluster-'{plain,hiredis}'") @@ -74,6 +85,8 @@ def clean(c): if os.path.isdir("dist"): shutil.rmtree("dist") run(f"docker rm -f {' '.join(dockers)}") + if os.path.isdir("docker/stunnel/keys"): + shutil.rmtree("docker/stunnel/keys") @task |