diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2021-05-28 08:55:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-28 08:55:33 +0200 |
commit | 490aeb3cfa932d9a7314f7c068ad034df89d5b05 (patch) | |
tree | a74da21416104436f46505fa2615f25c9a58ca94 /nixos | |
parent | 339a49503ae85b6cfd110b248010d24252d7aa45 (diff) | |
parent | 5259d66b7487b94233821e28aafb0683ae3f1df6 (diff) |
Merge pull request #124494 from hercules-ci/dockerTools-omit-store
dockerTools: Allow omitting all store paths
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/docker-tools.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nixos/tests/docker-tools.nix b/nixos/tests/docker-tools.nix index 39b97b4cb997f..831ef2fb77add 100644 --- a/nixos/tests/docker-tools.nix +++ b/nixos/tests/docker-tools.nix @@ -20,6 +20,20 @@ import ./make-test-python.nix ({ pkgs, ... }: { docker.wait_for_unit("sockets.target") + with subtest("includeStorePath"): + with subtest("assumption"): + docker.succeed("${examples.helloOnRoot} | docker load") + docker.succeed("set -euo pipefail; docker run --rm hello | grep -i hello") + docker.succeed("docker image rm hello:latest") + with subtest("includeStorePath = false; breaks example"): + docker.succeed("${examples.helloOnRootNoStore} | docker load") + docker.fail("set -euo pipefail; docker run --rm hello | grep -i hello") + docker.succeed("docker image rm hello:latest") + with subtest("includeStorePath = false; works with mounted store"): + docker.succeed("${examples.helloOnRootNoStore} | docker load") + docker.succeed("set -euo pipefail; docker run --rm --volume ${builtins.storeDir}:${builtins.storeDir}:ro hello | grep -i hello") + docker.succeed("docker image rm hello:latest") + with subtest("Ensure Docker images use a stable date by default"): docker.succeed( "docker load --input='${examples.bash}'" |