Loading test/integration/test_kubernetes_runner.py +8 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ import collections import json import os import shlex import string import subprocess import tempfile Loading Loading @@ -323,7 +324,13 @@ class BaseKubernetesIntegrationTestCase(BaseJobEnvironmentIntegrationTestCase, M self._wait_for_external_state(sa_session=sa_session, job=job, expected=app.model.Job.states.RUNNING) external_id = job.job_runner_external_id output = unicodify(subprocess.check_output(["kubectl", "logs", "-l", f"job-name={external_id}"])) log_cmd = ["kubectl", "logs", "-l", f"job-name={external_id}"] p = subprocess.run(log_cmd) if p.returncode: raise Exception( f"Command '{shlex.join(log_cmd)}' failed with exit code: {p.returncode}.\nstdout: {p.stdout}\nstderr: {p.stderr}" ) output = p.stdout EXPECTED_STDOUT = "The bool is not true" EXPECTED_STDERR = "The bool is very not true" assert EXPECTED_STDOUT in output Loading Loading
test/integration/test_kubernetes_runner.py +8 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ import collections import json import os import shlex import string import subprocess import tempfile Loading Loading @@ -323,7 +324,13 @@ class BaseKubernetesIntegrationTestCase(BaseJobEnvironmentIntegrationTestCase, M self._wait_for_external_state(sa_session=sa_session, job=job, expected=app.model.Job.states.RUNNING) external_id = job.job_runner_external_id output = unicodify(subprocess.check_output(["kubectl", "logs", "-l", f"job-name={external_id}"])) log_cmd = ["kubectl", "logs", "-l", f"job-name={external_id}"] p = subprocess.run(log_cmd) if p.returncode: raise Exception( f"Command '{shlex.join(log_cmd)}' failed with exit code: {p.returncode}.\nstdout: {p.stdout}\nstderr: {p.stderr}" ) output = p.stdout EXPECTED_STDOUT = "The bool is not true" EXPECTED_STDERR = "The bool is very not true" assert EXPECTED_STDOUT in output Loading