We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2dda9dc commit e4673d8Copy full SHA for e4673d8
tests/functional/cli/test_cli_artifacts.py
@@ -1,3 +1,4 @@
1
+import logging
2
import subprocess
3
import textwrap
4
import time
@@ -24,12 +25,22 @@
24
25
26
@pytest.fixture(scope="module")
27
def job_with_artifacts(gitlab_runner, project):
28
+ start_time = time.time()
29
+
30
project.files.create(data)
31
32
jobs = None
33
while not jobs:
34
time.sleep(0.5)
35
jobs = project.jobs.list(scope="success")
36
+ if time.time() - start_time < 60:
37
+ continue
38
+ logging.error("job never succeeded")
39
+ for job in project.jobs.list():
40
+ job = project.jobs.get(job.id)
41
+ logging.info(f"{job.status} job: {job.pformat()}")
42
+ logging.info(f"job log:\n{job.trace()}\n")
43
+ pytest.fail("Fixture 'job_with_artifact' failed")
44
45
return project.jobs.get(jobs[0].id)
46
0 commit comments