diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-02-02 18:46:31 +0100 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-02-02 18:48:41 +0100 |
commit | ba19f5478917cd8b92c81f22e425a7407f98e995 (patch) | |
tree | 3f76d324e2ab6b3e5367ee61b0378a838713336e /test | |
parent | test/unit: fix path to links-* tools (diff) | |
download | config-links-ba19f5478917cd8b92c81f22e425a7407f98e995.tar.gz config-links-ba19f5478917cd8b92c81f22e425a7407f98e995.zip |
fix Docker tests
Diffstat (limited to '')
-rw-r--r-- | test/docker-compose.yml | 5 | ||||
-rw-r--r-- | test/docker/Dockerfile | 9 | ||||
-rwxr-xr-x | test/unit/test.sh | 11 |
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 |