diff options
author | Albert Peschar <albert@peschar.net> | 2023-08-10 08:24:26 +0000 |
---|---|---|
committer | Albert Peschar <albert@peschar.net> | 2023-10-26 12:52:59 +0000 |
commit | 6ed6953e22ec8648f566c9a459e84e5b90a71806 (patch) | |
tree | 628aa5a5fe960eafa99341810fcfba86b7379511 /nixos/tests/oci-containers.nix | |
parent | 1ce5a446bb17c4d440c1159660eff6cdea7f66a4 (diff) |
nixos/oci-containers: stop container using backend
Make systemd actually call `podman stop` when stopping a container unit. Fixes #249332
Diffstat (limited to 'nixos/tests/oci-containers.nix')
-rw-r--r-- | nixos/tests/oci-containers.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/tests/oci-containers.nix b/nixos/tests/oci-containers.nix index 1afa9df36dfa4..e5029d3799f61 100644 --- a/nixos/tests/oci-containers.nix +++ b/nixos/tests/oci-containers.nix @@ -24,6 +24,10 @@ let ports = ["8181:80"]; }; }; + + # Stop systemd from killing remaining processes if ExecStop script + # doesn't work, so that proper stopping can be tested. + systemd.services."${backend}-nginx".serviceConfig.KillSignal = "SIGCONT"; }; }; @@ -32,6 +36,7 @@ let ${backend}.wait_for_unit("${backend}-nginx.service") ${backend}.wait_for_open_port(8181) ${backend}.wait_until_succeeds("curl -f http://localhost:8181 | grep Hello") + ${backend}.succeed("systemctl stop ${backend}-nginx.service", timeout=10) ''; }; |