Changeset View
Changeset View
Standalone View
Standalone View
docker/tests/conftest.py
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | for i in range(60): | ||||
if '[started]' in status: | if '[started]' in status: | ||||
time.sleep(1) | time.sleep(1) | ||||
continue | continue | ||||
if '[failed]' in status: | if '[failed]' in status: | ||||
loader_logs = subprocess.check_output( | loader_logs = subprocess.check_output( | ||||
['docker-compose', 'logs', 'swh-loader']) | ['docker-compose', 'logs', 'swh-loader']) | ||||
assert False, ('Loading execution failed\n' | assert False, ('Loading execution failed\n' | ||||
f'status: {status}\n' | f'status: {status}\n' | ||||
f'loader logs: {loader_logs}') | f'loader logs: ' | ||||
+ loader_logs.decode(errors='replace')) | |||||
assert False, f'Loading execution failed, task status is {status}' | assert False, f'Loading execution failed, task status is {status}' | ||||
return git_url | return git_url | ||||
# Utility functions | # Utility functions | ||||
def apiget(path: str, verb: str = 'GET', **kwargs): | def apiget(path: str, verb: str = 'GET', **kwargs): | ||||
"""Query the API at path and return the json result or raise an | """Query the API at path and return the json result or raise an | ||||
Show All 31 Lines |