From 0df292e90d869c0534903ab29ac3c3ee8f3a95a9 Mon Sep 17 00:00:00 2001 From: Rory& Date: Mon, 25 May 2026 08:55:43 +0200 Subject: [PATCH] nixos tests: check metrics endpoints on TS services --- nix/tests/test-bundle-starts.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nix/tests/test-bundle-starts.nix b/nix/tests/test-bundle-starts.nix index 2e088f6de..852b17180 100644 --- a/nix/tests/test-bundle-starts.nix +++ b/nix/tests/test-bundle-starts.nix @@ -73,6 +73,8 @@ in }; }; + # https://nixos.org/manual/nixos/stable/index.html#sec-nixos-tests + # https://nixos.org/manual/nixpkgs/unstable/#tester-runNixOSTest testScript = '' machine.wait_for_unit("spacebar-api") machine.wait_for_unit("spacebar-cdn") @@ -82,7 +84,13 @@ in machine.wait_for_open_port(3001) machine.wait_for_open_port(3002) machine.wait_for_open_port(3003) - # If well known works, its probably fine(tm)? + + # this should be working machine.succeed("curl -f http://api.sb.localhost/.well-known/spacebar/client") + + # check if metrics endpoint works on all services + machine.succeed("curl -f http://api.sb.localhost/metrics") + machine.succeed("curl -f http://gateway.sb.localhost/metrics") + machine.succeed("curl -f http://cdn.sb.localhost/metrics") ''; }