summaryrefslogtreecommitdiffstats
path: root/nixos/tests/docker-tools.nix
diff options
context:
space:
mode:
authorViktor Kronvall <viktor.kronvall@gmail.com>2021-04-07 23:05:36 +0900
committerViktor Kronvall <viktor.kronvall@gmail.com>2021-04-08 00:22:59 +0900
commit10019ab87995ec72e62af95a8b056db9a2e8a341 (patch)
treec5793662761defb0fc6ff921c1a7ee6f09433ef0 /nixos/tests/docker-tools.nix
parentbcc3f8eab5cac2c6ddaeab9d1fdc7afc2c348964 (diff)
dockerTools: test that mergeImages preserves owner
Diffstat (limited to 'nixos/tests/docker-tools.nix')
-rw-r--r--nixos/tests/docker-tools.nix8
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$'"
+ )
'';
})