mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
Merge pull request #85604 from adisbladis/podman-module
nixos/virtualisation.podman: Init module
This commit is contained in:
commit
2d91da909e
9 changed files with 1082 additions and 812 deletions
|
@ -248,6 +248,7 @@ in
|
|||
php = handleTest ./php {};
|
||||
plasma5 = handleTest ./plasma5.nix {};
|
||||
plotinus = handleTest ./plotinus.nix {};
|
||||
podman = handleTest ./podman.nix {};
|
||||
postgis = handleTest ./postgis.nix {};
|
||||
postgresql = handleTest ./postgresql.nix {};
|
||||
postgresql-wal-receiver = handleTest ./postgresql-wal-receiver.nix {};
|
||||
|
|
30
nixos/tests/podman.nix
Normal file
30
nixos/tests/podman.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
# This test runs podman and checks if simple container starts
|
||||
|
||||
import ./make-test-python.nix (
|
||||
{ pkgs, lib, ... }: {
|
||||
name = "podman";
|
||||
meta = {
|
||||
maintainers = lib.teams.podman.members;
|
||||
};
|
||||
|
||||
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")
|
||||
'';
|
||||
}
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue