From d175fc3af479f87a996ce58e269deef14ec2092c Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski <2151333+piotrkwiecinski@users.noreply.github.com> Date: Wed, 2 Apr 2025 14:37:58 +0200 Subject: [PATCH 1/5] nixosTests.docker: migrate to runTest Part of #386873 --- nixos/tests/all-tests.nix | 2 +- nixos/tests/docker.nix | 97 +++++++++++++++++++-------------------- 2 files changed, 48 insertions(+), 51 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 0d75a616e23a..2392cc5878b2 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -369,7 +369,7 @@ in dnscrypt-proxy2 = handleTestOn [ "x86_64-linux" ] ./dnscrypt-proxy2.nix { }; dnsdist = import ./dnsdist.nix { inherit pkgs runTest; }; doas = runTest ./doas.nix; - docker = handleTestOn [ "aarch64-linux" "x86_64-linux" ] ./docker.nix { }; + docker = runTestOn [ "aarch64-linux" "x86_64-linux" ] ./docker.nix; docker-rootless = handleTestOn [ "aarch64-linux" "x86_64-linux" ] ./docker-rootless.nix { }; docker-registry = handleTest ./docker-registry.nix { }; docker-tools = handleTestOn [ "x86_64-linux" ] ./docker-tools.nix { }; diff --git a/nixos/tests/docker.nix b/nixos/tests/docker.nix index b7c4b2690573..eb92d6e21b91 100644 --- a/nixos/tests/docker.nix +++ b/nixos/tests/docker.nix @@ -1,59 +1,56 @@ # This test runs docker and checks if simple container starts +{ pkgs, ... }: +{ + name = "docker"; + meta = with pkgs.lib.maintainers; { + maintainers = [ + nequissimus + offline + ]; + }; -import ./make-test-python.nix ( - { pkgs, ... }: - { - name = "docker"; - meta = with pkgs.lib.maintainers; { - maintainers = [ - nequissimus - offline - ]; - }; + nodes = { + docker = + { pkgs, ... }: + { + virtualisation.docker.enable = true; + virtualisation.docker.autoPrune.enable = true; + virtualisation.docker.package = pkgs.docker; - nodes = { - docker = - { pkgs, ... }: - { - virtualisation.docker.enable = true; - virtualisation.docker.autoPrune.enable = true; - virtualisation.docker.package = pkgs.docker; + users.users = { + noprivs = { + isNormalUser = true; + description = "Can't access the docker daemon"; + password = "foobar"; + }; - users.users = { - noprivs = { - isNormalUser = true; - description = "Can't access the docker daemon"; - password = "foobar"; - }; - - hasprivs = { - isNormalUser = true; - description = "Can access the docker daemon"; - password = "foobar"; - extraGroups = [ "docker" ]; - }; + hasprivs = { + isNormalUser = true; + description = "Can access the docker daemon"; + password = "foobar"; + extraGroups = [ "docker" ]; }; }; - }; + }; + }; - testScript = '' - start_all() + testScript = '' + start_all() - docker.wait_for_unit("sockets.target") - docker.succeed("tar cv --files-from /dev/null | docker import - scratchimg") - docker.succeed( - "docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10" - ) - docker.succeed("docker ps | grep sleeping") - docker.succeed("sudo -u hasprivs docker ps") - docker.fail("sudo -u noprivs docker ps") - docker.succeed("docker stop sleeping") + docker.wait_for_unit("sockets.target") + docker.succeed("tar cv --files-from /dev/null | docker import - scratchimg") + docker.succeed( + "docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10" + ) + docker.succeed("docker ps | grep sleeping") + docker.succeed("sudo -u hasprivs docker ps") + docker.fail("sudo -u noprivs docker ps") + docker.succeed("docker stop sleeping") - # Must match version 4 times to ensure client and server git commits and versions are correct - docker.succeed('[ $(docker version | grep ${pkgs.docker.version} | wc -l) = "4" ]') - docker.succeed("systemctl restart systemd-sysctl") - docker.succeed("grep 1 /proc/sys/net/ipv4/conf/all/forwarding") - docker.succeed("grep 1 /proc/sys/net/ipv4/conf/default/forwarding") - ''; - } -) + # Must match version 4 times to ensure client and server git commits and versions are correct + docker.succeed('[ $(docker version | grep ${pkgs.docker.version} | wc -l) = "4" ]') + docker.succeed("systemctl restart systemd-sysctl") + docker.succeed("grep 1 /proc/sys/net/ipv4/conf/all/forwarding") + docker.succeed("grep 1 /proc/sys/net/ipv4/conf/default/forwarding") + ''; +} From 852f3beab822ed76230a40df7b8d49c8138e895d Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski <2151333+piotrkwiecinski@users.noreply.github.com> Date: Wed, 2 Apr 2025 14:49:24 +0200 Subject: [PATCH 2/5] nixosTests.docker-rootless: migrate to runTestOn Part of #386873 --- nixos/tests/all-tests.nix | 2 +- nixos/tests/docker-rootless.nix | 85 ++++++++++++++++----------------- 2 files changed, 42 insertions(+), 45 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 2392cc5878b2..fd200903c79d 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -370,7 +370,7 @@ in dnsdist = import ./dnsdist.nix { inherit pkgs runTest; }; doas = runTest ./doas.nix; docker = runTestOn [ "aarch64-linux" "x86_64-linux" ] ./docker.nix; - docker-rootless = handleTestOn [ "aarch64-linux" "x86_64-linux" ] ./docker-rootless.nix { }; + docker-rootless = runTestOn [ "aarch64-linux" "x86_64-linux" ] ./docker-rootless.nix; docker-registry = handleTest ./docker-registry.nix { }; docker-tools = handleTestOn [ "x86_64-linux" ] ./docker-tools.nix { }; docker-tools-nix-shell = runTest ./docker-tools-nix-shell.nix; diff --git a/nixos/tests/docker-rootless.nix b/nixos/tests/docker-rootless.nix index 2a97ccb35f91..a2e6a52ca13c 100644 --- a/nixos/tests/docker-rootless.nix +++ b/nixos/tests/docker-rootless.nix @@ -1,51 +1,48 @@ # This test runs docker and checks if simple container starts +{ lib, pkgs, ... }: +{ + name = "docker-rootless"; + meta = with pkgs.lib.maintainers; { + maintainers = [ abbradar ]; + }; -import ./make-test-python.nix ( - { lib, pkgs, ... }: - { - name = "docker-rootless"; - meta = with pkgs.lib.maintainers; { - maintainers = [ abbradar ]; - }; + nodes = { + machine = + { pkgs, ... }: + { + virtualisation.docker.rootless.enable = true; - nodes = { - machine = - { pkgs, ... }: - { - virtualisation.docker.rootless.enable = true; - - users.users.alice = { - uid = 1000; - isNormalUser = true; - }; + users.users.alice = { + uid = 1000; + isNormalUser = true; }; - }; + }; + }; - testScript = - { nodes, ... }: - let - user = nodes.machine.config.users.users.alice; - sudo = lib.concatStringsSep " " [ - "XDG_RUNTIME_DIR=/run/user/${toString user.uid}" - "DOCKER_HOST=unix:///run/user/${toString user.uid}/docker.sock" - "sudo" - "--preserve-env=XDG_RUNTIME_DIR,DOCKER_HOST" - "-u" - "alice" - ]; - in - '' - machine.wait_for_unit("multi-user.target") + testScript = + { nodes, ... }: + let + user = nodes.machine.config.users.users.alice; + sudo = lib.concatStringsSep " " [ + "XDG_RUNTIME_DIR=/run/user/${toString user.uid}" + "DOCKER_HOST=unix:///run/user/${toString user.uid}/docker.sock" + "sudo" + "--preserve-env=XDG_RUNTIME_DIR,DOCKER_HOST" + "-u" + "alice" + ]; + in + '' + machine.wait_for_unit("multi-user.target") - machine.succeed("loginctl enable-linger alice") - machine.wait_until_succeeds("${sudo} systemctl --user is-active docker.service") + machine.succeed("loginctl enable-linger alice") + machine.wait_until_succeeds("${sudo} systemctl --user is-active docker.service") - machine.succeed("tar cv --files-from /dev/null | ${sudo} docker import - scratchimg") - machine.succeed( - "${sudo} docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10" - ) - machine.succeed("${sudo} docker ps | grep sleeping") - machine.succeed("${sudo} docker stop sleeping") - ''; - } -) + machine.succeed("tar cv --files-from /dev/null | ${sudo} docker import - scratchimg") + machine.succeed( + "${sudo} docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10" + ) + machine.succeed("${sudo} docker ps | grep sleeping") + machine.succeed("${sudo} docker stop sleeping") + ''; +} From cc69d51afbd7362d727a83043898ca9d8a77b04d Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski <2151333+piotrkwiecinski@users.noreply.github.com> Date: Wed, 2 Apr 2025 14:57:40 +0200 Subject: [PATCH 3/5] nixosTests.docker-registry: migrate to runTest Part of #386873 --- nixos/tests/all-tests.nix | 2 +- nixos/tests/docker-registry.nix | 123 ++++++++++++++++---------------- 2 files changed, 61 insertions(+), 64 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index fd200903c79d..36ea1dcf68a6 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -371,7 +371,7 @@ in doas = runTest ./doas.nix; docker = runTestOn [ "aarch64-linux" "x86_64-linux" ] ./docker.nix; docker-rootless = runTestOn [ "aarch64-linux" "x86_64-linux" ] ./docker-rootless.nix; - docker-registry = handleTest ./docker-registry.nix { }; + docker-registry = runTest ./docker-registry.nix; docker-tools = handleTestOn [ "x86_64-linux" ] ./docker-tools.nix { }; docker-tools-nix-shell = runTest ./docker-tools-nix-shell.nix; docker-tools-cross = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./docker-tools-cross.nix { }; diff --git a/nixos/tests/docker-registry.nix b/nixos/tests/docker-registry.nix index aeb95a564c0e..73658b67fb13 100644 --- a/nixos/tests/docker-registry.nix +++ b/nixos/tests/docker-registry.nix @@ -1,74 +1,71 @@ # This test runs docker-registry and check if it works +{ pkgs, ... }: +{ + name = "docker-registry"; + meta = with pkgs.lib.maintainers; { + maintainers = [ + globin + ironpinguin + cafkafk + ]; + }; -import ./make-test-python.nix ( - { pkgs, ... }: - { - name = "docker-registry"; - meta = with pkgs.lib.maintainers; { - maintainers = [ - globin - ironpinguin - cafkafk - ]; - }; + nodes = { + registry = + { ... }: + { + services.dockerRegistry.enable = true; + services.dockerRegistry.enableDelete = true; + services.dockerRegistry.port = 8080; + services.dockerRegistry.listenAddress = "0.0.0.0"; + services.dockerRegistry.enableGarbageCollect = true; + services.dockerRegistry.openFirewall = true; + }; - nodes = { - registry = - { ... }: - { - services.dockerRegistry.enable = true; - services.dockerRegistry.enableDelete = true; - services.dockerRegistry.port = 8080; - services.dockerRegistry.listenAddress = "0.0.0.0"; - services.dockerRegistry.enableGarbageCollect = true; - services.dockerRegistry.openFirewall = true; - }; + client1 = + { ... }: + { + virtualisation.docker.enable = true; + virtualisation.docker.extraOptions = "--insecure-registry registry:8080"; + }; - client1 = - { ... }: - { - virtualisation.docker.enable = true; - virtualisation.docker.extraOptions = "--insecure-registry registry:8080"; - }; + client2 = + { ... }: + { + virtualisation.docker.enable = true; + virtualisation.docker.extraOptions = "--insecure-registry registry:8080"; + }; + }; - client2 = - { ... }: - { - virtualisation.docker.enable = true; - virtualisation.docker.extraOptions = "--insecure-registry registry:8080"; - }; - }; + testScript = '' + client1.start() + client1.wait_for_unit("docker.service") + client1.succeed("tar cv --files-from /dev/null | docker import - scratch") + client1.succeed("docker tag scratch registry:8080/scratch") - testScript = '' - client1.start() - client1.wait_for_unit("docker.service") - client1.succeed("tar cv --files-from /dev/null | docker import - scratch") - client1.succeed("docker tag scratch registry:8080/scratch") + registry.start() + registry.wait_for_unit("docker-registry.service") + registry.wait_for_open_port(8080) + client1.succeed("docker push registry:8080/scratch") - registry.start() - registry.wait_for_unit("docker-registry.service") - registry.wait_for_open_port(8080) - client1.succeed("docker push registry:8080/scratch") + client2.start() + client2.wait_for_unit("docker.service") + client2.succeed("docker pull registry:8080/scratch") + client2.succeed("docker images | grep scratch") - client2.start() - client2.wait_for_unit("docker.service") - client2.succeed("docker pull registry:8080/scratch") - client2.succeed("docker images | grep scratch") + client2.succeed( + "curl -fsS -X DELETE registry:8080/v2/scratch/manifests/$(curl -fsS -I -H\"Accept: application/vnd.docker.distribution.manifest.v2+json\" registry:8080/v2/scratch/manifests/latest | grep Docker-Content-Digest | sed -e 's/Docker-Content-Digest: //' | tr -d '\\r')" + ) - client2.succeed( - "curl -fsS -X DELETE registry:8080/v2/scratch/manifests/$(curl -fsS -I -H\"Accept: application/vnd.docker.distribution.manifest.v2+json\" registry:8080/v2/scratch/manifests/latest | grep Docker-Content-Digest | sed -e 's/Docker-Content-Digest: //' | tr -d '\\r')" - ) + registry.systemctl("start docker-registry-garbage-collect.service") + registry.wait_until_fails("systemctl status docker-registry-garbage-collect.service") + registry.wait_for_unit("docker-registry.service") - registry.systemctl("start docker-registry-garbage-collect.service") - registry.wait_until_fails("systemctl status docker-registry-garbage-collect.service") - registry.wait_for_unit("docker-registry.service") + registry.fail("ls -l /var/lib/docker-registry/docker/registry/v2/blobs/sha256/*/*/data") - registry.fail("ls -l /var/lib/docker-registry/docker/registry/v2/blobs/sha256/*/*/data") - - client1.succeed("docker push registry:8080/scratch") - registry.succeed( - "ls -l /var/lib/docker-registry/docker/registry/v2/blobs/sha256/*/*/data" - ) - ''; - } -) + client1.succeed("docker push registry:8080/scratch") + registry.succeed( + "ls -l /var/lib/docker-registry/docker/registry/v2/blobs/sha256/*/*/data" + ) + ''; +} From d3b5f7650551e90a4e3b486327521a18e7d5419d Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski <2151333+piotrkwiecinski@users.noreply.github.com> Date: Wed, 2 Apr 2025 17:14:24 +0200 Subject: [PATCH 4/5] nixosTests.docker-tools-overlay: migrate to runTestOn Part of #386873 --- nixos/tests/all-tests.nix | 2 +- nixos/tests/docker-tools-overlay.nix | 63 +++++++++++++--------------- 2 files changed, 31 insertions(+), 34 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 36ea1dcf68a6..ea46753b748c 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -375,7 +375,7 @@ in docker-tools = handleTestOn [ "x86_64-linux" ] ./docker-tools.nix { }; docker-tools-nix-shell = runTest ./docker-tools-nix-shell.nix; docker-tools-cross = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./docker-tools-cross.nix { }; - docker-tools-overlay = handleTestOn [ "x86_64-linux" ] ./docker-tools-overlay.nix { }; + docker-tools-overlay = runTestOn [ "x86_64-linux" ] ./docker-tools-overlay.nix; docling-serve = runTest ./docling-serve.nix; documize = handleTest ./documize.nix { }; documentation = pkgs.callPackage ../modules/misc/documentation/test.nix { inherit nixosLib; }; diff --git a/nixos/tests/docker-tools-overlay.nix b/nixos/tests/docker-tools-overlay.nix index a1de0272703f..98a72f78e3e1 100644 --- a/nixos/tests/docker-tools-overlay.nix +++ b/nixos/tests/docker-tools-overlay.nix @@ -1,38 +1,35 @@ # this test creates a simple GNU image with docker tools and sees if it executes +{ pkgs, ... }: +{ + name = "docker-tools-overlay"; + meta = with pkgs.lib.maintainers; { + maintainers = [ + lnl7 + roberth + ]; + }; -import ./make-test-python.nix ( - { pkgs, ... }: - { - name = "docker-tools-overlay"; - meta = with pkgs.lib.maintainers; { - maintainers = [ - lnl7 - roberth - ]; - }; + nodes = { + docker = + { ... }: + { + virtualisation.docker.enable = true; + virtualisation.docker.storageDriver = "overlay2"; + }; + }; - nodes = { - docker = - { ... }: - { - virtualisation.docker.enable = true; - virtualisation.docker.storageDriver = "overlay2"; - }; - }; + testScript = '' + docker.wait_for_unit("sockets.target") - testScript = '' - docker.wait_for_unit("sockets.target") + docker.succeed( + "docker load --input='${pkgs.dockerTools.examples.bash}'", + "docker run --rm ${pkgs.dockerTools.examples.bash.imageName} bash --version", + ) - docker.succeed( - "docker load --input='${pkgs.dockerTools.examples.bash}'", - "docker run --rm ${pkgs.dockerTools.examples.bash.imageName} bash --version", - ) - - # Check if the nix store has correct user permissions depending on what - # storage driver is used, incorrectly built images can show up as readonly. - # drw------- 3 0 0 3 Apr 14 11:36 /nix - # drw------- 99 0 0 100 Apr 14 11:36 /nix/store - docker.succeed("docker run --rm -u 1000:1000 ${pkgs.dockerTools.examples.bash.imageName} bash --version") - ''; - } -) + # Check if the nix store has correct user permissions depending on what + # storage driver is used, incorrectly built images can show up as readonly. + # drw------- 3 0 0 3 Apr 14 11:36 /nix + # drw------- 99 0 0 100 Apr 14 11:36 /nix/store + docker.succeed("docker run --rm -u 1000:1000 ${pkgs.dockerTools.examples.bash.imageName} bash --version") + ''; +} From b7a4f78fcb00c44e5e5b1bf480f8ef59baac2724 Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski <2151333+piotrkwiecinski@users.noreply.github.com> Date: Wed, 2 Apr 2025 17:19:19 +0200 Subject: [PATCH 5/5] nixosTests.docker-tools-cross: migrate to runTestOn Part of #386873 --- nixos/tests/all-tests.nix | 2 +- nixos/tests/docker-tools-cross.nix | 134 ++++++++++++++--------------- 2 files changed, 67 insertions(+), 69 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index ea46753b748c..3b0138e43a7e 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -374,7 +374,7 @@ in docker-registry = runTest ./docker-registry.nix; docker-tools = handleTestOn [ "x86_64-linux" ] ./docker-tools.nix { }; docker-tools-nix-shell = runTest ./docker-tools-nix-shell.nix; - docker-tools-cross = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./docker-tools-cross.nix { }; + docker-tools-cross = runTestOn [ "x86_64-linux" "aarch64-linux" ] ./docker-tools-cross.nix; docker-tools-overlay = runTestOn [ "x86_64-linux" ] ./docker-tools-overlay.nix; docling-serve = runTest ./docling-serve.nix; documize = handleTest ./documize.nix { }; diff --git a/nixos/tests/docker-tools-cross.nix b/nixos/tests/docker-tools-cross.nix index e2508be134f0..afd78223e857 100644 --- a/nixos/tests/docker-tools-cross.nix +++ b/nixos/tests/docker-tools-cross.nix @@ -2,83 +2,81 @@ # tests that _include_ running the result are separate. That way, most people # can run the majority of the test suite without the extra setup. -import ./make-test-python.nix ( - { pkgs, ... }: - let +{ pkgs, ... }: +let - remoteSystem = - if pkgs.stdenv.hostPlatform.system == "aarch64-linux" then "x86_64-linux" else "aarch64-linux"; + remoteSystem = + if pkgs.stdenv.hostPlatform.system == "aarch64-linux" then "x86_64-linux" else "aarch64-linux"; - remoteCrossPkgs = - import ../.. # nixpkgs - { - # NOTE: This is the machine that runs the build - local from the - # 'perspective' of the build script. - localSystem = remoteSystem; + remoteCrossPkgs = + import ../.. # nixpkgs + { + # NOTE: This is the machine that runs the build - local from the + # 'perspective' of the build script. + localSystem = remoteSystem; - # NOTE: Since this file can't control where the test will be _run_ we don't - # cross-compile _to_ a different system but _from_ a different system - crossSystem = pkgs.stdenv.hostPlatform.system; - }; - - hello1 = remoteCrossPkgs.dockerTools.buildImage { - name = "hello1"; - tag = "latest"; - copyToRoot = remoteCrossPkgs.buildEnv { - name = "image-root"; - pathsToLink = [ "/bin" ]; - paths = [ remoteCrossPkgs.hello ]; + # NOTE: Since this file can't control where the test will be _run_ we don't + # cross-compile _to_ a different system but _from_ a different system + crossSystem = pkgs.stdenv.hostPlatform.system; }; - }; - hello2 = remoteCrossPkgs.dockerTools.buildLayeredImage { - name = "hello2"; - tag = "latest"; - contents = remoteCrossPkgs.hello; + hello1 = remoteCrossPkgs.dockerTools.buildImage { + name = "hello1"; + tag = "latest"; + copyToRoot = remoteCrossPkgs.buildEnv { + name = "image-root"; + pathsToLink = [ "/bin" ]; + paths = [ remoteCrossPkgs.hello ]; }; + }; - in - { - name = "docker-tools"; - meta = with pkgs.lib.maintainers; { - maintainers = [ roberth ]; - }; + hello2 = remoteCrossPkgs.dockerTools.buildLayeredImage { + name = "hello2"; + tag = "latest"; + contents = remoteCrossPkgs.hello; + }; - nodes = { - docker = - { ... }: - { - virtualisation = { - diskSize = 2048; - docker.enable = true; - }; +in +{ + name = "docker-tools"; + meta = with pkgs.lib.maintainers; { + maintainers = [ roberth ]; + }; + + nodes = { + docker = + { ... }: + { + virtualisation = { + diskSize = 2048; + docker.enable = true; }; - }; + }; + }; - testScript = '' - docker.wait_for_unit("sockets.target") + testScript = '' + docker.wait_for_unit("sockets.target") - with subtest("Ensure cross compiled buildImage image can run."): - docker.succeed( - "docker load --input='${hello1}'" - ) - assert "Hello, world!" in docker.succeed( - "docker run --rm ${hello1.imageName} hello", - ) - docker.succeed( - "docker rmi ${hello1.imageName}", - ) + with subtest("Ensure cross compiled buildImage image can run."): + docker.succeed( + "docker load --input='${hello1}'" + ) + assert "Hello, world!" in docker.succeed( + "docker run --rm ${hello1.imageName} hello", + ) + docker.succeed( + "docker rmi ${hello1.imageName}", + ) - with subtest("Ensure cross compiled buildLayeredImage image can run."): - docker.succeed( - "docker load --input='${hello2}'" - ) - assert "Hello, world!" in docker.succeed( - "docker run --rm ${hello2.imageName} hello", - ) - docker.succeed( - "docker rmi ${hello2.imageName}", - ) - ''; - } -) + with subtest("Ensure cross compiled buildLayeredImage image can run."): + docker.succeed( + "docker load --input='${hello2}'" + ) + assert "Hello, world!" in docker.succeed( + "docker run --rm ${hello2.imageName} hello", + ) + docker.succeed( + "docker rmi ${hello2.imageName}", + ) + ''; +}