Skip to content

Commit 281050e

Browse files
committed
[jump_ci] testing: test: move the cluster lock dir computation to a variable
1 parent 82a15ab commit 281050e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

projects/jump_ci/testing/test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ def do_jump_ci(cluster=None, project=None, test_args=None):
100100

101101
run.run_toolbox("jump_ci", "ensure_lock", cluster=cluster, owner=utils.get_lock_owner())
102102

103+
cluster_lock_dir = f" /tmp/topsail_{cluster}"
104+
103105
if test_args is not None:
104106
variables_overrides_dict = dict(
105107
PR_POSITIONAL_ARGS=test_args,
@@ -134,7 +136,7 @@ def do_jump_ci(cluster=None, project=None, test_args=None):
134136
)
135137

136138
try:
137-
tunnelling.run_with_ansible_ssh_conf(f"bash /tmp/{cluster}/test/{command}/entrypoint.sh")
139+
tunnelling.run_with_ansible_ssh_conf(f"bash {cluster_lock_dir}/test/{command}/entrypoint.sh")
138140
logging.info(f"Test step '{command}' on cluster '{cluster}' succeeded.")
139141
failed = False
140142
except subprocess.CalledProcessError as e:
@@ -145,7 +147,7 @@ def do_jump_ci(cluster=None, project=None, test_args=None):
145147
raise
146148
finally:
147149
# always run the cleanup to be sure that the container doesn't stay running
148-
tunnelling.run_with_ansible_ssh_conf(f"bash /tmp/{cluster}/test/{command}/entrypoint.sh cleanup")
150+
tunnelling.run_with_ansible_ssh_conf(f"bash {cluster_lock_dir}/test/{command}/entrypoint.sh cleanup")
149151

150152
run.run_toolbox(
151153
"jump_ci", "retrieve_artifacts",

0 commit comments

Comments
 (0)