summary refs log tree commit diff
path: root/nixos/tests/docker-tools.nix
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2021-05-08 21:49:39 +1000
committerJustin Bedo <cu@cua0.org>2021-09-29 15:35:21 +1000
commit0319228a458f471c017c326ac39fdb6925156271 (patch)
tree5f451b6ffd8a1d5aae1f931431e5ed63d98a479e /nixos/tests/docker-tools.nix
parent895f3956d266e2e90b66d03ea97ebc082bffd12c (diff)
downloadnixpkgs-0319228a458f471c017c326ac39fdb6925156271.tar
nixpkgs-0319228a458f471c017c326ac39fdb6925156271.tar.gz
nixpkgs-0319228a458f471c017c326ac39fdb6925156271.tar.bz2
nixpkgs-0319228a458f471c017c326ac39fdb6925156271.tar.lz
nixpkgs-0319228a458f471c017c326ac39fdb6925156271.tar.xz
nixpkgs-0319228a458f471c017c326ac39fdb6925156271.tar.zst
nixpkgs-0319228a458f471c017c326ac39fdb6925156271.zip
docker-tools: add example for exportImage functionality and test
Diffstat (limited to 'nixos/tests/docker-tools.nix')
-rw-r--r--nixos/tests/docker-tools.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/tests/docker-tools.nix b/nixos/tests/docker-tools.nix
index 4c3c26980aa..1f0088d63fd 100644
--- a/nixos/tests/docker-tools.nix
+++ b/nixos/tests/docker-tools.nix
@@ -378,5 +378,10 @@ import ./make-test-python.nix ({ pkgs, ... }: {
         docker.succeed(
             "docker run --rm ${examples.layeredImageWithFakeRootCommands.imageName} sh -c 'stat -c '%u' /home/jane | grep -E ^1000$'"
         )
+
+    with subtest("exportImage produces a valid tarball"):
+        docker.succeed(
+            "tar -tf ${examples.exportBash} > /dev/null"
+        )
   '';
 })