Skip to content

Commit 829c85a

Browse files
committed
Added redis_mod_url arg
1 parent e3246b5 commit 829c85a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/actions/run-tests/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,13 @@ runs:
113113
if (( $REDIS_MAJOR_VERSION < 8 )); then
114114
if [ "$protocol" == "2" ] || [ "${{inputs.parser-backend}}" != 'hiredis' ]; then
115115
echo "::group::RESP${protocol} cluster tests"
116-
invoke cluster-tests $eventloop --protocol=${protocol} --extra-markers="not redismod"
116+
invoke cluster-tests --redis-mod-url=${REDIS_MOD_URL} $eventloop --protocol=${protocol} --extra-markers="not redismod"
117117
echo "::endgroup::"
118118
fi
119119
else
120120
if [ "$protocol" == "2" ] || [ "${{inputs.parser-backend}}" != 'hiredis' ]; then
121121
echo "::group::RESP${protocol} cluster tests"
122-
invoke cluster-tests $eventloop --protocol=${protocol}
122+
invoke cluster-tests --redis-mod-url=${REDIS_MOD_URL} $eventloop --protocol=${protocol}
123123
echo "::endgroup::"
124124
fi
125125
fi

tasks.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,20 @@ def standalone_tests(
6969

7070

7171
@task
72-
def cluster_tests(c, uvloop=False, protocol=2, profile=False, extra_markers=""):
72+
def cluster_tests(c, uvloop=False, protocol=2, profile=False, redis_mod_url=None, extra_markers=""):
7373
"""Run tests against a redis cluster"""
7474
profile_arg = "--profile" if profile else ""
75+
redis_mod_url = f"--redis-mod-url={redis_mod_url}" if redis_mod_url else ""
7576
cluster_url = "redis://localhost:16379/0"
7677
cluster_tls_url = "rediss://localhost:27379/0"
7778
extra_markers = f" and {extra_markers}" if extra_markers else ""
7879
if uvloop:
7980
run(
80-
f"pytest {profile_arg} --protocol={protocol} --cov=./ --cov-report=xml:coverage_cluster_resp{protocol}_uvloop.xml -m 'not onlynoncluster and not graph{extra_markers}' --redis-url={cluster_url} --redis-ssl-url={cluster_tls_url} --junit-xml=cluster-resp{protocol}-uvloop-results.xml --uvloop"
81+
f"pytest {profile_arg} --protocol={protocol} {redis_mod_url} --cov=./ --cov-report=xml:coverage_cluster_resp{protocol}_uvloop.xml -m 'not onlynoncluster and not graph{extra_markers}' --redis-url={cluster_url} --redis-ssl-url={cluster_tls_url} --junit-xml=cluster-resp{protocol}-uvloop-results.xml --uvloop"
8182
)
8283
else:
8384
run(
84-
f"pytest {profile_arg} --protocol={protocol} --cov=./ --cov-report=xml:coverage_cluster_resp{protocol}.xml -m 'not onlynoncluster and not graph{extra_markers}' --redis-url={cluster_url} --redis-ssl-url={cluster_tls_url} --junit-xml=cluster-resp{protocol}-results.xml"
85+
f"pytest {profile_arg} --protocol={protocol} {redis_mod_url} --cov=./ --cov-report=xml:coverage_cluster_resp{protocol}.xml -m 'not onlynoncluster and not graph{extra_markers}' --redis-url={cluster_url} --redis-ssl-url={cluster_tls_url} --junit-xml=cluster-resp{protocol}-results.xml"
8586
)
8687

8788

0 commit comments

Comments
 (0)