Skip to content

Commit 1bdb0f0

Browse files
committed
Fix tests
1 parent fe93c32 commit 1bdb0f0

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

build_yaml.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,8 @@ def build_job_body(
9797
},
9898
},
9999
}
100+
with open("job.yaml", "w") as fd:
101+
import json
102+
103+
json.dump(body, fd, indent=2)
100104
return body

tests/test_br.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,15 @@ def test_create_job_nowait(
7474
"activeDeadlineSeconds": 900,
7575
"template": {
7676
"spec": {
77-
"maximumExecutionTimeSeconds": 900,
7877
"restartPolicy": "Never",
7978
"containers": [
8079
{
8180
"name": "job-v100-123-container",
8281
"image": "image-registry.openshift-image-registry.svc:5000/redhat-ods-applications/csw-run-f25:latest",
8382
"command": [
84-
"/bin/sh",
83+
"/bin/bash",
8584
"-c",
86-
f"\nexport RSYNC_RSH='oc rsh -c container1'\n\nmkdir -p job-v100-123 && \n rsync -q --archive --no-owner --no-group --omit-dir-times --numeric-ids testhost:{tempdir}/jobs/job-v100-123/getlist job-v100-123/getlist >&/dev/null &&\n rsync -q -r --archive --no-owner --no-group --omit-dir-times --numeric-ids --files-from=job-v100-123/getlist testhost:{tempdir}/ job-v100-123/ &&\n find job-v100-123 -mindepth 1 -maxdepth 1 > job-v100-123/gotlist &&\n cd job-v100-123 && \n |& tee job-v100-123.log\n\ncd ..\nrsync -q --archive --no-owner --no-group --omit-dir-times --no-relative --numeric-ids --exclude-from=job-v100-123/gotlist job-v100-123 testhost:{tempdir}/jobs\n",
85+
f"\nset -e\nexport RSYNC_RSH='oc rsh -c container1'\n\nmkdir -p job-v100-123\n\nrsync -q --archive --no-owner --no-group --omit-dir-times --numeric-ids testhost:{tempdir}/jobs/job-v100-123/getlist job-v100-123/getlist\nrsync -q -r --archive --no-owner --no-group --omit-dir-times --numeric-ids --files-from=job-v100-123/getlist testhost:{tempdir}/ job-v100-123/\nfind job-v100-123 -mindepth 1 -maxdepth 1 > job-v100-123/gotlist\n\n(\n cd job-v100-123 && |& tee job-v100-123.log\n)\n\nrsync -q --archive --no-owner --no-group --omit-dir-times --no-relative --numeric-ids --exclude-from=job-v100-123/gotlist job-v100-123 testhost:{tempdir}/jobs\n",
8786
],
8887
"resources": {
8988
"requests": {"nvidia.com/gpu": "1"},

0 commit comments

Comments
 (0)