mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
parent
cc69d51afb
commit
d3b5f76505
2 changed files with 31 additions and 34 deletions
|
@ -375,7 +375,7 @@ in
|
||||||
docker-tools = handleTestOn [ "x86_64-linux" ] ./docker-tools.nix { };
|
docker-tools = handleTestOn [ "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 = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./docker-tools-cross.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;
|
docling-serve = runTest ./docling-serve.nix;
|
||||||
documize = handleTest ./documize.nix { };
|
documize = handleTest ./documize.nix { };
|
||||||
documentation = pkgs.callPackage ../modules/misc/documentation/test.nix { inherit nixosLib; };
|
documentation = pkgs.callPackage ../modules/misc/documentation/test.nix { inherit nixosLib; };
|
||||||
|
|
|
@ -1,38 +1,35 @@
|
||||||
# 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
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
name = "docker-tools-overlay";
|
||||||
|
meta = with pkgs.lib.maintainers; {
|
||||||
|
maintainers = [
|
||||||
|
lnl7
|
||||||
|
roberth
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
import ./make-test-python.nix (
|
nodes = {
|
||||||
{ pkgs, ... }:
|
docker =
|
||||||
{
|
{ ... }:
|
||||||
name = "docker-tools-overlay";
|
{
|
||||||
meta = with pkgs.lib.maintainers; {
|
virtualisation.docker.enable = true;
|
||||||
maintainers = [
|
virtualisation.docker.storageDriver = "overlay2";
|
||||||
lnl7
|
};
|
||||||
roberth
|
};
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
nodes = {
|
testScript = ''
|
||||||
docker =
|
docker.wait_for_unit("sockets.target")
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
virtualisation.docker.storageDriver = "overlay2";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
testScript = ''
|
docker.succeed(
|
||||||
docker.wait_for_unit("sockets.target")
|
"docker load --input='${pkgs.dockerTools.examples.bash}'",
|
||||||
|
"docker run --rm ${pkgs.dockerTools.examples.bash.imageName} bash --version",
|
||||||
|
)
|
||||||
|
|
||||||
docker.succeed(
|
# Check if the nix store has correct user permissions depending on what
|
||||||
"docker load --input='${pkgs.dockerTools.examples.bash}'",
|
# storage driver is used, incorrectly built images can show up as readonly.
|
||||||
"docker run --rm ${pkgs.dockerTools.examples.bash.imageName} bash --version",
|
# 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")
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue