Unverified Commit f73a0793 authored by Jonas Fierlings's avatar Jonas Fierlings
Browse files

dockerTools: Test changing compression of `buildLayeredImage`

parent 7e1f7217
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -178,6 +178,14 @@ in {
            "docker load --input='${examples.bashUncompressed}'",
            "docker rmi ${examples.bashUncompressed.imageName}",
        )
        docker.succeed(
            "docker load --input='${examples.bashLayeredUncompressed}'",
            "docker rmi ${examples.bashLayeredUncompressed.imageName}",
        )
        docker.succeed(
            "docker load --input='${examples.bashLayeredZstdCompressed}'",
            "docker rmi ${examples.bashLayeredZstdCompressed.imageName}",
        )

    with subtest(
        "Check if the nix store is correctly initialized by listing "
+17 −1
Original line number Diff line number Diff line
@@ -509,7 +509,23 @@ rec {
    contents = pkgs.bashInteractive;
  };

  # buildImage without explicit tag
  # buildLayeredImage without compression
  bashLayeredUncompressed = pkgs.dockerTools.buildLayeredImage {
    name = "bash-layered-uncompressed";
    tag = "latest";
    compressor = "none";
    contents = pkgs.bashInteractive;
  };

  # buildLayeredImage with zstd compression
  bashLayeredZstdCompressed = pkgs.dockerTools.buildLayeredImage {
    name = "bash-layered-zstd";
    tag = "latest";
    compressor = "zstd";
    contents = pkgs.bashInteractive;
  };

  # streamLayeredImage without explicit tag
  bashNoTagStreamLayered = pkgs.dockerTools.streamLayeredImage {
    name = "bash-no-tag-stream-layered";
    contents = pkgs.bashInteractive;