2020-04-20 10:37:53 +02:00
|
|
|
# This test runs podman and checks if simple container starts
|
|
|
|
|
|
|
|
import ./make-test-python.nix (
|
2020-04-20 13:35:36 +02:00
|
|
|
{ pkgs, lib, ... }: {
|
2020-04-20 10:37:53 +02:00
|
|
|
name = "podman";
|
2020-04-20 13:35:36 +02:00
|
|
|
meta = {
|
|
|
|
maintainers = lib.teams.podman.members;
|
2020-04-20 10:37:53 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nodes = {
|
|
|
|
podman =
|
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
virtualisation.podman.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
start_all()
|
|
|
|
|
|
|
|
podman.wait_for_unit("sockets.target")
|
|
|
|
podman.succeed("tar cv --files-from /dev/null | podman import - scratchimg")
|
|
|
|
podman.succeed(
|
|
|
|
"podman run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
|
|
|
|
)
|
|
|
|
podman.succeed("podman ps | grep sleeping")
|
|
|
|
podman.succeed("podman stop sleeping")
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
)
|