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 e30a2924..cc3052bb 100644 --- a/exasol/ds/sandbox/runtime/ansible/roles/entrypoint/files/entrypoint.py +++ b/exasol/ds/sandbox/runtime/ansible/roles/entrypoint/files/entrypoint.py @@ -204,8 +204,8 @@ def __repr__(self): class FileInspector: - def __init__(self, path: str): - self.path = path + def __init__(self, path: Path): + self._path = path self._stat = None @property @@ -220,7 +220,7 @@ def group_id(self) -> int: def is_group_accessible(self) -> bool: if not os.path.exists(self.path): - _logger.debug(f"No file {self.path}") + _logger.debug(f"File not found {self.path}") return False permissions = stat.filemode(self.stat.st_mode) if permissions[4:6] == "rw": @@ -238,10 +238,10 @@ class GroupAccess: other group is expected to exist already and user to be added to it. """ def __init__(self, user: str, group: Group): - self.user = user - self.group = group + self._user = user + self._group = group - def _find_group(self, id: int) -> str: + def _find_group_name(self, id: int) -> str: try: return grp.getgrgid(id).gr_name except KeyError: diff --git a/test/integration/test_create_dss_docker_image.py b/test/integration/test_create_dss_docker_image.py index 9c72d683..fdc96e45 100644 --- a/test/integration/test_create_dss_docker_image.py +++ b/test/integration/test_create_dss_docker_image.py @@ -109,7 +109,7 @@ def request_with_retry(url: str) -> requests.Response: assert response.status_code == 200 -def test_install_notebook_connector(dss_docker_container): +def test_import_notebook_connector(dss_docker_container): container = dss_docker_container command = ('/home/jupyter/jupyterenv/bin/python' ' -c "import exasol.nb_connector.secret_store"') @@ -147,7 +147,7 @@ def test_docker_socket_access(dss_docker_container): @pytest.fixture -def socket_on_host(tmp_path): +def fake_docker_socket_on_host(tmp_path): socket = tmp_path / "socket.txt" socket.touch() socket.chmod(0o660)