diff options
author | Robert Hensing <robert@roberthensing.nl> | 2021-10-18 12:39:51 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2021-10-18 12:41:51 +0200 |
commit | 3b9d05e114550db6ea23befa078bd978371d863c (patch) | |
tree | a20746d84a3b76268f7b38018b60e42b9535baa2 /nixos/tests/docker-tools.nix | |
parent | c7fd252d324f6eb4eeb9a769d1533cb4ede361ad (diff) | |
download | nixpkgs-3b9d05e114550db6ea23befa078bd978371d863c.tar nixpkgs-3b9d05e114550db6ea23befa078bd978371d863c.tar.gz nixpkgs-3b9d05e114550db6ea23befa078bd978371d863c.tar.bz2 nixpkgs-3b9d05e114550db6ea23befa078bd978371d863c.tar.lz nixpkgs-3b9d05e114550db6ea23befa078bd978371d863c.tar.xz nixpkgs-3b9d05e114550db6ea23befa078bd978371d863c.tar.zst nixpkgs-3b9d05e114550db6ea23befa078bd978371d863c.zip |
dockerTools: Fix and test #118722 path in contents
Diffstat (limited to 'nixos/tests/docker-tools.nix')
-rw-r--r-- | nixos/tests/docker-tools.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/tests/docker-tools.nix b/nixos/tests/docker-tools.nix index e482223436f..7110187e8d7 100644 --- a/nixos/tests/docker-tools.nix +++ b/nixos/tests/docker-tools.nix @@ -383,5 +383,18 @@ import ./make-test-python.nix ({ pkgs, ... }: { docker.succeed( "tar -tf ${examples.exportBash} | grep '\./bin/bash' > /dev/null" ) + + with subtest("Ensure bare paths in contents are loaded correctly"): + docker.succeed( + "docker load --input='${examples.build-image-with-path}'", + "docker run --rm build-image-with-path bash -c '[[ -e /hello.txt ]]'", + "docker rmi build-image-with-path", + ) + docker.succeed( + "${examples.layered-image-with-path} | docker load", + "docker run --rm layered-image-with-path bash -c '[[ -e /hello.txt ]]'", + "docker rmi layered-image-with-path", + ) + ''; }) |