diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index e9f6f0f9585e..dd5991a365d0 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -813,7 +813,7 @@ in { nginx-sso = runTest ./nginx-sso.nix; nginx-status-page = runTest ./nginx-status-page.nix; nginx-tmpdir = runTest ./nginx-tmpdir.nix; - nginx-unix-socket = handleTest ./nginx-unix-socket.nix {}; + nginx-unix-socket = runTest ./nginx-unix-socket.nix; nginx-variants = handleTest ./nginx-variants.nix {}; nifi = runTestOn ["x86_64-linux"] ./web-apps/nifi.nix; nitter = handleTest ./nitter.nix {}; diff --git a/nixos/tests/nginx-unix-socket.nix b/nixos/tests/nginx-unix-socket.nix index 020a1a7cd97a..19d9377868ef 100644 --- a/nixos/tests/nginx-unix-socket.nix +++ b/nixos/tests/nginx-unix-socket.nix @@ -1,31 +1,29 @@ -import ./make-test-python.nix ( - { pkgs, ... }: - let - nginxSocketPath = "/var/run/nginx/test.sock"; - in - { - name = "nginx-unix-socket"; +{ ... }: +let + nginxSocketPath = "/var/run/nginx/test.sock"; +in +{ + name = "nginx-unix-socket"; - nodes = { - webserver = - { pkgs, lib, ... }: - { - services.nginx = { - enable = true; - virtualHosts.localhost = { - serverName = "localhost"; - listen = [ { addr = "unix:${nginxSocketPath}"; } ]; - locations."/test".return = "200 'foo'"; - }; + nodes = { + webserver = + { pkgs, lib, ... }: + { + services.nginx = { + enable = true; + virtualHosts.localhost = { + serverName = "localhost"; + listen = [ { addr = "unix:${nginxSocketPath}"; } ]; + locations."/test".return = "200 'foo'"; }; }; - }; + }; + }; - testScript = '' - webserver.wait_for_unit("nginx") - webserver.wait_for_open_unix_socket("${nginxSocketPath}") + testScript = '' + webserver.wait_for_unit("nginx") + webserver.wait_for_open_unix_socket("${nginxSocketPath}") - webserver.succeed("curl --fail --silent --unix-socket '${nginxSocketPath}' http://localhost/test | grep '^foo$'") - ''; - } -) + webserver.succeed("curl --fail --silent --unix-socket '${nginxSocketPath}' http://localhost/test | grep '^foo$'") + ''; +}