diff --git a/nixos/tests/nginx-sso.nix b/nixos/tests/nginx-sso.nix index 067f196b16b..8834fc31c38 100644 --- a/nixos/tests/nginx-sso.nix +++ b/nixos/tests/nginx-sso.nix @@ -32,15 +32,17 @@ import ./make-test-python.nix ({ pkgs, ... }: { machine.wait_for_unit("nginx-sso.service") machine.wait_for_open_port(8080) - # No valid user -> 401. - machine.fail("curl -sSf http://localhost:8080/auth") + with subtest("No valid user -> 401"): + machine.fail("curl -sSf http://localhost:8080/auth") - # Valid user but no matching ACL -> 403. - machine.fail("curl -sSf -H 'Authorization: Token MyToken' http://localhost:8080/auth") + with subtest("Valid user but no matching ACL -> 403"): + machine.fail( + "curl -sSf -H 'Authorization: Token MyToken' http://localhost:8080/auth" + ) - # Valid user and matching ACL -> 200. - machine.succeed( - "curl -sSf -H 'Authorization: Token MyToken' -H 'X-Application: MyApp' http://localhost:8080/auth" - ) + with subtest("Valid user and matching ACL -> 200"): + machine.succeed( + "curl -sSf -H 'Authorization: Token MyToken' -H 'X-Application: MyApp' http://localhost:8080/auth" + ) ''; })