mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 11:02:05 +00:00
nixos/tests/podman: test podman run --init
This commit is contained in:
parent
4b11122749
commit
fd3f1ec19a
|
@ -96,6 +96,15 @@ import ./make-test-python.nix (
|
|||
podman.succeed(su_cmd("podman ps | grep sleeping"))
|
||||
podman.succeed(su_cmd("podman stop sleeping"))
|
||||
podman.succeed(su_cmd("podman rm sleeping"))
|
||||
|
||||
with subtest("Run container with init"):
|
||||
podman.succeed(
|
||||
"tar cv -C ${pkgs.pkgsStatic.busybox} . | podman import - busybox"
|
||||
)
|
||||
pid = podman.succeed("podman run --rm busybox readlink /proc/self").strip()
|
||||
assert pid == "1"
|
||||
pid = podman.succeed("podman run --rm --init busybox readlink /proc/self").strip()
|
||||
assert pid == "2"
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue