Skip to content

Commit 361343b

Browse files
Running dockerhub tests by default on CI
1 parent 4f855b7 commit 361343b

File tree

5 files changed

+33
-136
lines changed

5 files changed

+33
-136
lines changed

.github/workflows/tox-self-hosted.yml

Lines changed: 0 additions & 105 deletions
This file was deleted.

utils/tests/test_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def test_commit_schema_to_stream_then_build():
8383

8484
def should_run_builder():
8585
run_builder = True
86-
TST_BUILDER_X = os.getenv("TST_BUILDER_X", "1")
86+
TST_BUILDER_X = os.getenv("TST_BUILDER_X", "0")
8787
if TST_BUILDER_X == "0":
8888
run_builder = False
8989
return run_builder

utils/tests/test_runner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def test_extract_testsuites():
258258
]
259259
)
260260
tests = extract_testsuites(args)
261-
assert len(tests) == 4
261+
assert len(tests) == 6
262262

263263
args = parser.parse_args(
264264
args=[
@@ -269,7 +269,7 @@ def test_extract_testsuites():
269269
]
270270
)
271271
tests = extract_testsuites(args)
272-
assert len(tests) == 4
272+
assert len(tests) == 6
273273

274274
args = parser.parse_args(
275275
args=[

utils/tests/test_self_contained_coordinator.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
from redis_benchmarks_specification.__self_contained_coordinator__.self_contained_coordinator import (
2020
self_contained_coordinator_blocking_read,
2121
)
22-
from redis_benchmarks_specification.__self_contained_coordinator__.clients import (
23-
prepare_memtier_benchmark_parameters,
24-
)
22+
2523
from redis_benchmarks_specification.__self_contained_coordinator__.runners import (
2624
build_runners_consumer_group_create,
2725
get_runners_consumer_group_name,
@@ -89,13 +87,17 @@ def test_generate_cpuset_cpus():
8987
assert db_cpuset_cpus == "2,3,4"
9088

9189

90+
def run_coordinator_tests():
91+
run_coordinator = True
92+
TST_RUNNER_X = os.getenv("TST_RUNNER_X", "0")
93+
if TST_RUNNER_X == "0":
94+
run_coordinator = False
95+
return run_coordinator
96+
97+
9298
def test_self_contained_coordinator_blocking_read():
9399
try:
94-
run_coordinator = True
95-
TST_RUNNER_X = os.getenv("TST_RUNNER_X", "1")
96-
if TST_RUNNER_X == "0":
97-
run_coordinator = False
98-
if run_coordinator:
100+
if run_coordinator_tests():
99101
conn = redis.StrictRedis(port=6379)
100102
conn.ping()
101103
expected_datapoint_ts = None

utils/tests/test_self_contained_coordinator_memtier.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,7 @@
3535

3636
def test_self_contained_coordinator_blocking_read():
3737
try:
38-
run_coordinator = True
39-
TST_RUNNER_X = os.getenv("TST_RUNNER_X", "1")
40-
if TST_RUNNER_X == "0":
41-
run_coordinator = False
42-
if run_coordinator:
38+
if run_coordinator_tests():
4339
db_port = int(os.getenv("DATASINK_PORT", "6379"))
4440
conn = redis.StrictRedis(port=db_port)
4541
conn.ping()
@@ -210,13 +206,25 @@ def test_self_contained_coordinator_blocking_read():
210206
pass
211207

212208

209+
def run_coordinator_tests():
210+
run_coordinator = True
211+
TST_RUNNER_X = os.getenv("TST_RUNNER_X", "0")
212+
if TST_RUNNER_X == "0":
213+
run_coordinator = False
214+
return run_coordinator
215+
216+
217+
def run_coordinator_tests_dockerhub():
218+
run_coordinator = True
219+
TST_RUNNER_X = os.getenv("TST_RUNNER_DOCKERHUB_X", "1")
220+
if TST_RUNNER_X == "0":
221+
run_coordinator = False
222+
return run_coordinator
223+
224+
213225
def test_self_contained_coordinator_dockerhub():
214226
try:
215-
run_coordinator = True
216-
TST_RUNNER_X = os.getenv("TST_RUNNER_X", "1")
217-
if TST_RUNNER_X == "0":
218-
run_coordinator = False
219-
if run_coordinator:
227+
if run_coordinator_tests_dockerhub():
220228
db_port = int(os.getenv("DATASINK_PORT", "6379"))
221229
conn = redis.StrictRedis(port=db_port)
222230
conn.ping()
@@ -342,11 +350,7 @@ def test_self_contained_coordinator_dockerhub():
342350

343351
def test_self_contained_coordinator_dockerhub_valkey():
344352
try:
345-
run_coordinator = True
346-
TST_RUNNER_X = os.getenv("TST_RUNNER_X", "1")
347-
if TST_RUNNER_X == "0":
348-
run_coordinator = False
349-
if run_coordinator:
353+
if run_coordinator_tests_dockerhub():
350354
db_port = int(os.getenv("DATASINK_PORT", "6379"))
351355
conn = redis.StrictRedis(port=db_port)
352356
conn.ping()
@@ -477,11 +481,7 @@ def test_self_contained_coordinator_dockerhub_valkey():
477481

478482
def test_self_contained_coordinator_skip_build_variant():
479483
try:
480-
run_coordinator = True
481-
TST_RUNNER_X = os.getenv("TST_RUNNER_X", "1")
482-
if TST_RUNNER_X == "0":
483-
run_coordinator = False
484-
if run_coordinator:
484+
if run_coordinator_tests():
485485
db_port = int(os.getenv("DATASINK_PORT", "6379"))
486486
conn = redis.StrictRedis(port=db_port)
487487
conn.ping()

0 commit comments

Comments
 (0)