From 4b21ee658500197952834fa75ebd3e680fc97493 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Wed, 30 Oct 2024 10:42:29 +0000 Subject: [PATCH] Add locate command inside the containers Fixes: #445 --- .config/dictionary.txt | 1 + devspaces/context/setup.sh | 1 + final/setup.sh | 1 + tests/integration/conftest.py | 2 +- tests/integration/test_container.py | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/dictionary.txt b/.config/dictionary.txt index e68dab55..bfb3242c 100644 --- a/.config/dictionary.txt +++ b/.config/dictionary.txt @@ -23,6 +23,7 @@ libera libonig microdnf mknod +mlocate modifyitems netcommon opencontainers diff --git a/devspaces/context/setup.sh b/devspaces/context/setup.sh index 526e4bed..e1ed0bf3 100755 --- a/devspaces/context/setup.sh +++ b/devspaces/context/setup.sh @@ -14,6 +14,7 @@ dnf install -y -q \ git \ git-core \ libssh-devel \ + mlocate \ ncurses \ openssh-clients \ podman \ diff --git a/final/setup.sh b/final/setup.sh index 50b0dfa0..dbe0a2cc 100755 --- a/final/setup.sh +++ b/final/setup.sh @@ -32,6 +32,7 @@ zsh \ util-linux-user \ which \ git \ +mlocate \ nano \ vim \ dumb-init \ diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index d8872343..fef9fff3 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -90,7 +90,7 @@ def send_and_wait(self, cmd: str, wait_for: str, timeout: float = 3.0) -> list[s def exit(self) -> None: """Exit the tmux session.""" if any("ansible-navigator" in cmd for cmd in self.cmds): - self.send_and_wait(cmd=":q", wait_for="workdir") + self.send_and_wait(cmd=":q", wait_for="workdir", timeout=6) self.send_and_wait(cmd="exit", wait_for="") diff --git a/tests/integration/test_container.py b/tests/integration/test_container.py index e4279657..4d6ab651 100644 --- a/tests/integration/test_container.py +++ b/tests/integration/test_container.py @@ -75,6 +75,7 @@ def test_container_in_container( @pytest.mark.parametrize( ("app", "command"), ( + pytest.param("locate", None, id="locate"), pytest.param("nano", None, id="nano"), pytest.param("tar", None, id="tar"), pytest.param("vi", None, id="vi"),