Unverified Commit 7c33658b authored by Marius van den Beek's avatar Marius van den Beek Committed by GitHub
Browse files

Capture output of kubectl command

parent c027c2d9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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}"