aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/docker-compose.yml5
-rw-r--r--test/docker/Dockerfile9
-rwxr-xr-xtest/unit/test.sh11
3 files changed, 24 insertions, 1 deletions
diff --git a/test/docker-compose.yml b/test/docker-compose.yml
index 1a4374a..ec55b25 100644
--- a/test/docker-compose.yml
+++ b/test/docker-compose.yml
@@ -1,7 +1,10 @@
version: '3'
services:
test:
- image: "ubuntu:${DISTRO:-xenial}"
+ build:
+ context: docker/
+ args:
+ DISTRO: "${DISTRO:-xenial}"
volumes:
- ../:/src
command: /src/test/unit/test.sh
diff --git a/test/docker/Dockerfile b/test/docker/Dockerfile
new file mode 100644
index 0000000..b67e6f0
--- /dev/null
+++ b/test/docker/Dockerfile
@@ -0,0 +1,9 @@
+ARG DISTRO=xenial
+
+FROM ubuntu:$DISTRO
+
+RUN apt-get update && \
+ DEBIAN_FRONTEND=noninteractive \
+ apt-get install -y --no-install-recommends git
+
+RUN git config --global --add safe.directory /src
diff --git a/test/unit/test.sh b/test/unit/test.sh
index c7645ea..f693aa1 100755
--- a/test/unit/test.sh
+++ b/test/unit/test.sh
@@ -417,7 +417,18 @@ $test_dest_dir/foo/2.txt->$test_src_dir/%DEST%/foo/2.txt"
verify_mode "$expected_mode" "$test_src_dir/%DEST%/1.txt"
}
+show_env() {
+ echo
+ echo ======================================================================
+ echo Environment
+ echo ======================================================================
+
+ bash --version
+}
+
main() {
+ show_env
+
test_update_works
test_remove_works
test_remove_does_not_overwrite_files