From 79d6f6b3fbeb5a7ab39eb751f0d6b67cc561e277 Mon Sep 17 00:00:00 2001 From: ckunki Date: Fri, 8 Mar 2024 15:14:50 +0100 Subject: [PATCH] Fixed check for existance [run-notebook-tests] --- .../runtime/ansible/roles/entrypoint/files/entrypoint.py | 2 +- .../test_notebooks_in_dss_docker_image.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/exasol/ds/sandbox/runtime/ansible/roles/entrypoint/files/entrypoint.py b/exasol/ds/sandbox/runtime/ansible/roles/entrypoint/files/entrypoint.py index 3785f881..5018a438 100644 --- a/exasol/ds/sandbox/runtime/ansible/roles/entrypoint/files/entrypoint.py +++ b/exasol/ds/sandbox/runtime/ansible/roles/entrypoint/files/entrypoint.py @@ -212,7 +212,7 @@ def group_id(self) -> int: return self.stat.st_gid def is_group_accessible(self) -> bool: - if not os.path.isfile(self.path): + if not os.path.exists(self.path): _logger.debug(f"No file {self.path}") return False permissions = stat.filemode(self.stat.st_mode) diff --git a/test/notebook_test_runner/test_notebooks_in_dss_docker_image.py b/test/notebook_test_runner/test_notebooks_in_dss_docker_image.py index cd93fb75..fb9f3e99 100644 --- a/test/notebook_test_runner/test_notebooks_in_dss_docker_image.py +++ b/test/notebook_test_runner/test_notebooks_in_dss_docker_image.py @@ -63,8 +63,8 @@ def notebook_test_container_with_log(notebook_test_container): print(socket) print(socket.stat()) print() - print("Container Logs:") - print(notebook_test_container.logs().decode("utf-8"), flush=True) + logs = notebook_test_container.logs().decode("utf-8").strip() + print("Container Logs: {logs or '(empty)'}", flush=True) yield notebook_test_container