summary refs log tree commit diff
path: root/nixos/tests/docker-tools.nix
diff options
context:
space:
mode:
authorUtku Demir <me@utdemir.com>2020-07-04 22:00:57 +1200
committerUtku Demir <me@utdemir.com>2020-07-04 22:00:57 +1200
commitcc46362929dbb5d13a8ff8c4669ac3a8d47db028 (patch)
treea010a8fc180cb4d032f91f9156fcea6903fef5eb /nixos/tests/docker-tools.nix
parentf6ef771ab905608a9894fdd0439479f29880b6e6 (diff)
downloadnixpkgs-cc46362929dbb5d13a8ff8c4669ac3a8d47db028.tar
nixpkgs-cc46362929dbb5d13a8ff8c4669ac3a8d47db028.tar.gz
nixpkgs-cc46362929dbb5d13a8ff8c4669ac3a8d47db028.tar.bz2
nixpkgs-cc46362929dbb5d13a8ff8c4669ac3a8d47db028.tar.lz
nixpkgs-cc46362929dbb5d13a8ff8c4669ac3a8d47db028.tar.xz
nixpkgs-cc46362929dbb5d13a8ff8c4669ac3a8d47db028.tar.zst
nixpkgs-cc46362929dbb5d13a8ff8c4669ac3a8d47db028.zip
dockerTools: Support files directly under /nix/store
Also makes sure that the files inside a layer added in a sorted order
to make the results more deterministic.
Diffstat (limited to 'nixos/tests/docker-tools.nix')
-rw-r--r--nixos/tests/docker-tools.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/nixos/tests/docker-tools.nix b/nixos/tests/docker-tools.nix
index c48e5b07976..01f7d17f58f 100644
--- a/nixos/tests/docker-tools.nix
+++ b/nixos/tests/docker-tools.nix
@@ -178,5 +178,11 @@ import ./make-test-python.nix ({ pkgs, ... }: {
         # This check may be loosened to allow an *empty* store rather than *no* store.
         docker.succeed("docker run --rm no-store-paths ls /")
         docker.fail("docker run --rm no-store-paths ls /nix/store")
+
+    with subtest("Ensure buildLayeredImage supports files directly under /nix/store"):
+        docker.succeed(
+            "docker load --input='${pkgs.dockerTools.examples.filesInStore}'",
+            "docker run file-in-store |& grep 'some data'",
+        )
   '';
 })