nixosTests.docker-tools-overlay: Port to Python
This commit is contained in:
parent
86a9d80b45
commit
4a7ba2cdfe
@ -1,6 +1,6 @@
|
|||||||
# 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.nix ({ pkgs, ... }:
|
import ./make-test-python.nix ({ pkgs, ... }:
|
||||||
{
|
{
|
||||||
name = "docker-tools-overlay";
|
name = "docker-tools-overlay";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
@ -16,17 +16,18 @@ import ./make-test.nix ({ pkgs, ... }:
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript =
|
testScript = ''
|
||||||
''
|
docker.wait_for_unit("sockets.target")
|
||||||
$docker->waitForUnit("sockets.target");
|
|
||||||
|
|
||||||
$docker->succeed("docker load --input='${pkgs.dockerTools.examples.bash}'");
|
docker.succeed(
|
||||||
$docker->succeed("docker run --rm ${pkgs.dockerTools.examples.bash.imageName} bash --version");
|
"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
|
# Check if the nix store has correct user permissions depending on what
|
||||||
# storage driver is used, incorrectly built images can show up as readonly.
|
# storage driver is used, incorrectly built images can show up as readonly.
|
||||||
# drw------- 3 0 0 3 Apr 14 11:36 /nix
|
# drw------- 3 0 0 3 Apr 14 11:36 /nix
|
||||||
# drw------- 99 0 0 100 Apr 14 11:36 /nix/store
|
# 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");
|
docker.succeed("docker run --rm -u 1000:1000 ${pkgs.dockerTools.examples.bash.imageName} bash --version")
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user