about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorPeder Bergebakken Sundt <pbsds@hotmail.com>2024-02-10 17:12:56 +0100
committerGitHub <noreply@github.com>2024-02-10 17:12:56 +0100
commitc43fd32e030355bbdba6a686048136d5969b70bb (patch)
tree755fa75d285f867c5a163d7b3ac3fe3859760649 /nixos/tests
parentc65ffe3f171d721f017b3397f9fcbc00e091f242 (diff)
parent6ed6953e22ec8648f566c9a459e84e5b90a71806 (diff)
Merge pull request #248315 from apeschar/oci-containers-backend-stop
nixos/oci-containers: stop container using backend
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/oci-containers.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/tests/oci-containers.nix b/nixos/tests/oci-containers.nix
index 205ce623d089c..1f8e276204a82 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)
     '';
   };