From fb538a36bb7b7bc3125f756ff6cfc90bb2ea0eff Mon Sep 17 00:00:00 2001 From: Hannes Kuchelmeister Date: Fri, 15 Jul 2022 22:02:20 +0200 Subject: [PATCH] add image to run tests, however, toolbox commands cannot be tested properly as of now --- Containerfile | 17 +++++++++++++++++ docker-compose.test.yml | 10 ++++++++++ src/toolbx/mod.rs | 1 + 3 files changed, 28 insertions(+) create mode 100644 Containerfile create mode 100644 docker-compose.test.yml diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..af6867f --- /dev/null +++ b/Containerfile @@ -0,0 +1,17 @@ +FROM quay.io/podman/stable + +ENV RUST_VERSION=1.61.0 +ENV HOME=/home/root + +RUN dnf install gtk4-devel gcc libadwaita-devel -y +RUN dnf install toolbox -y + +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y +RUN . $HOME/.cargo/env +ENV PATH=/home/root/.cargo/bin:$PATH +RUN rustup install ${RUST_VERSION} + +WORKDIR /mnt + +CMD cargo test + diff --git a/docker-compose.test.yml b/docker-compose.test.yml new file mode 100644 index 0000000..f48a7c0 --- /dev/null +++ b/docker-compose.test.yml @@ -0,0 +1,10 @@ +version: "3" +services: + toolbx-tuner-tests: + build: . + privileged: true + volumes: + - .:/mnt:z + security_opt: + - label=disable + \ No newline at end of file diff --git a/src/toolbx/mod.rs b/src/toolbx/mod.rs index eb03c15..ff84b97 100644 --- a/src/toolbx/mod.rs +++ b/src/toolbx/mod.rs @@ -250,6 +250,7 @@ pub fn run_cmd_toolbx_list_containers() -> String { } #[test] +#[ignore] fn test_cmd_list_containers() { // This requires toolbx to be installed let toolbox_cmd_container_header =