at 23.11-pre 900 B view raw
1{ system ? builtins.currentSystem, 2 config ? {}, 3 pkgs ? import ../.. { inherit system config; } 4}: 5 6with import ../lib/testing-python.nix { inherit system pkgs; }; 7 8builtins.listToAttrs ( 9 builtins.map 10 (nginxName: 11 { 12 name = nginxName; 13 value = makeTest { 14 name = "nginx-variant-${nginxName}"; 15 16 nodes.machine = { pkgs, ... }: { 17 services.nginx = { 18 enable = true; 19 virtualHosts.localhost.locations."/".return = "200 'foo'"; 20 package = pkgs."${nginxName}"; 21 }; 22 }; 23 24 testScript = '' 25 machine.wait_for_unit("nginx") 26 machine.wait_for_open_port(80) 27 machine.succeed('test "$(curl -fvvv http://localhost/)" = foo') 28 ''; 29 }; 30 } 31 ) 32 [ "nginxStable" "nginxMainline" "nginxQuic" "nginxShibboleth" "openresty" "tengine" ] 33)