nixosTests.docker-tools: handleTest -> runTest

This commit is contained in:
Sizhe Zhao 2025-06-07 21:00:38 +08:00
parent 9880867c45
commit ea619766ea
No known key found for this signature in database
GPG Key ID: ED1807251A7DA08F
2 changed files with 589 additions and 591 deletions

View File

@ -414,7 +414,7 @@ in
docker = runTestOn [ "aarch64-linux" "x86_64-linux" ] ./docker.nix; docker = runTestOn [ "aarch64-linux" "x86_64-linux" ] ./docker.nix;
docker-rootless = runTestOn [ "aarch64-linux" "x86_64-linux" ] ./docker-rootless.nix; docker-rootless = runTestOn [ "aarch64-linux" "x86_64-linux" ] ./docker-rootless.nix;
docker-registry = runTest ./docker-registry.nix; docker-registry = runTest ./docker-registry.nix;
docker-tools = handleTestOn [ "x86_64-linux" ] ./docker-tools.nix { }; docker-tools = runTestOn [ "x86_64-linux" ] ./docker-tools.nix;
docker-tools-nix-shell = runTest ./docker-tools-nix-shell.nix; docker-tools-nix-shell = runTest ./docker-tools-nix-shell.nix;
docker-tools-cross = runTestOn [ "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; docker-tools-overlay = runTestOn [ "x86_64-linux" ] ./docker-tools-overlay.nix;

View File

@ -1,8 +1,7 @@
# this test creates a simple GNU image with docker tools and sees if it executes # this test creates a simple GNU image with docker tools and sees if it executes
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: let
let
# nixpkgs#214434: dockerTools.buildImage fails to unpack base images # nixpkgs#214434: dockerTools.buildImage fails to unpack base images
# containing duplicate layers when those duplicate tarballs # containing duplicate layers when those duplicate tarballs
# appear under the manifest's 'Layers'. Docker can generate images # appear under the manifest's 'Layers'. Docker can generate images
@ -87,8 +86,8 @@ import ./make-test-python.nix (
]; ];
}; };
}; };
in in
{ {
name = "docker-tools"; name = "docker-tools";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ maintainers = [
@ -600,5 +599,4 @@ import ./make-test-python.nix (
"docker run --rm ${chownTestImage.imageName} | diff /dev/stdin <(echo 12345:12345)" "docker run --rm ${chownTestImage.imageName} | diff /dev/stdin <(echo 12345:12345)"
) )
''; '';
} }
)