diff options
author | Viktor Kronvall <viktor.kronvall@gmail.com> | 2021-04-07 23:05:36 +0900 |
---|---|---|
committer | Viktor Kronvall <viktor.kronvall@gmail.com> | 2021-04-08 00:22:59 +0900 |
commit | 10019ab87995ec72e62af95a8b056db9a2e8a341 (patch) | |
tree | c5793662761defb0fc6ff921c1a7ee6f09433ef0 /nixos/tests/docker-tools.nix | |
parent | bcc3f8eab5cac2c6ddaeab9d1fdc7afc2c348964 (diff) |
dockerTools: test that mergeImages preserves owner
Diffstat (limited to 'nixos/tests/docker-tools.nix')
-rw-r--r-- | nixos/tests/docker-tools.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nixos/tests/docker-tools.nix b/nixos/tests/docker-tools.nix index 35b5504ea0fd..96662b4540cc 100644 --- a/nixos/tests/docker-tools.nix +++ b/nixos/tests/docker-tools.nix @@ -356,5 +356,13 @@ import ./make-test-python.nix ({ pkgs, ... }: { docker.succeed("docker run --rm ${examples.redis.imageName} redis-cli --version") docker.succeed("docker rmi ${examples.bashNoTag.imageName}:${examples.bashNoTag.imageTag}") docker.succeed("docker rmi ${examples.redis.imageName}") + + with subtest("mergeImages preserves owners of the original images"): + docker.succeed( + "docker load --input='${examples.mergedBashFakeRoot}'" + ) + docker.succeed( + "docker run --rm ${examples.layeredImageWithFakeRootCommands.imageName} sh -c 'stat -c '%u' /home/jane | grep -E ^1000$'" + ) ''; }) |