From 7bd52b8a936f0d64acfa6c3f4ead45875f17d5cb Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Thu, 5 Dec 2019 01:57:50 -0600 Subject: [PATCH] testing? --- run-tests.sh | 3 +++ src/ops/empty.rs | 1 + tests.Dockerfile | 9 +++++++++ 3 files changed, 13 insertions(+) create mode 100644 tests.Dockerfile diff --git a/run-tests.sh b/run-tests.sh index a9bf588..baa7b95 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -1 +1,4 @@ #!/bin/bash + +IMAGE=$(docker build -q -f tests.Dockerfile .) +exec docker run --rm -it $IMAGE diff --git a/src/ops/empty.rs b/src/ops/empty.rs index d861665..24a13c2 100644 --- a/src/ops/empty.rs +++ b/src/ops/empty.rs @@ -13,6 +13,7 @@ pub fn empty(dry: bool, days: Option) -> Result<(), Error> { } else { Local::now() }; + for file in home_trash.iter()? { let file = file?; diff --git a/tests.Dockerfile b/tests.Dockerfile new file mode 100644 index 0000000..5dd77fb --- /dev/null +++ b/tests.Dockerfile @@ -0,0 +1,9 @@ +FROM rust:1.39 +WORKDIR /usr/src/garbage +COPY . . +RUN pwd +RUN ls -l +RUN cargo build --release + +FROM alpine:latest +COPY --from=0 /usr/src/garbage/target/release/garbage .