mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Capture output of kubectl command
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
This commit is contained in:
co-authored by
Nicola Soranzo
parent
c027c2d98d
commit
7c33658b57
@@ -325,7 +325,7 @@ class BaseKubernetesIntegrationTestCase(BaseJobEnvironmentIntegrationTestCase, M
|
||||
|
||||
external_id = job.job_runner_external_id
|
||||
log_cmd = ["kubectl", "logs", "-l", f"job-name={external_id}"]
|
||||
p = subprocess.run(log_cmd)
|
||||
p = subprocess.run(log_cmd, capture_output=True, text=True)
|
||||
if p.returncode:
|
||||
raise Exception(
|
||||
f"Command '{shlex.join(log_cmd)}' failed with exit code: {p.returncode}.\nstdout: {p.stdout}\nstderr: {p.stderr}"
|
||||
|
||||
Reference in New Issue
Block a user