1 { system ? builtins.currentSystem
3 , pkgs ? import ../.. { inherit system config; }
9 inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest;
11 mkOCITest = backend: makeTest {
12 name = "oci-containers-${backend}";
14 meta.maintainers = lib.teams.serokell.members
15 ++ (with lib.maintainers; [ benley mkaito ]);
18 ${backend} = { pkgs, ... }: {
19 virtualisation.oci-containers = {
22 image = "nginx-container";
23 imageStream = pkgs.dockerTools.examples.nginxStream;
28 # Stop systemd from killing remaining processes if ExecStop script
29 # doesn't work, so that proper stopping can be tested.
30 systemd.services."${backend}-nginx".serviceConfig.KillSignal = "SIGCONT";
36 ${backend}.wait_for_unit("${backend}-nginx.service")
37 ${backend}.wait_for_open_port(8181)
38 ${backend}.wait_until_succeeds("curl -f http://localhost:8181 | grep Hello")
39 ${backend}.succeed("systemctl stop ${backend}-nginx.service", timeout=10)
44 lib.foldl' (attrs: backend: attrs // { ${backend} = mkOCITest backend; }) {} [