add image to run tests, however, toolbox commands cannot be tested properly as of now

This commit is contained in:
2022-07-15 22:02:20 +02:00
parent 64017daa09
commit fb538a36bb
3 changed files with 28 additions and 0 deletions

17
Containerfile Normal file
View File

@@ -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

10
docker-compose.test.yml Normal file
View File

@@ -0,0 +1,10 @@
version: "3"
services:
toolbx-tuner-tests:
build: .
privileged: true
volumes:
- .:/mnt:z
security_opt:
- label=disable

View File

@@ -250,6 +250,7 @@ pub fn run_cmd_toolbx_list_containers() -> String {
} }
#[test] #[test]
#[ignore]
fn test_cmd_list_containers() { fn test_cmd_list_containers() {
// This requires toolbx to be installed // This requires toolbx to be installed
let toolbox_cmd_container_header = let toolbox_cmd_container_header =