git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/tests/podman: test podman run --init
commitfd3f1ec19a934d55fa68725db2aaf51146c82dc4 authorAndrey Golovizin <ag@sologoc.com> dateSun 21 Mar 2021, 21:12 (6 years ago) parent4b11122
1 file changed+9
nixos/tests/podman.nix+9
nixos/tests/podman.nix+9
@@ -96,6 +96,15 @@ import ./make-test-python.nix (
9696 podman.succeed(su_cmd("podman ps | grep sleeping"))
9797 podman.succeed(su_cmd("podman stop sleeping"))
9898 podman.succeed(su_cmd("podman rm sleeping"))
99+
100+ with subtest("Run container with init"):
101+ podman.succeed(
102+ "tar cv -C ${pkgs.pkgsStatic.busybox} . | podman import - busybox"
103+ )
104+ pid = podman.succeed("podman run --rm busybox readlink /proc/self").strip()
105+ assert pid == "1"
106+ pid = podman.succeed("podman run --rm --init busybox readlink /proc/self").strip()
107+ assert pid == "2"
99108 '';
100109 }
101110)