From 6f3912bfd3391fb342dbcdd1d8b3eacdc2aec5e6 Mon Sep 17 00:00:00 2001 From: transcaffeine Date: Sun, 23 Feb 2025 15:59:57 +0100 Subject: [PATCH] nixos/tests/gotosocial: adjust for gotosocial 0.18.1+ --- nixos/tests/web-apps/gotosocial.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/tests/web-apps/gotosocial.nix b/nixos/tests/web-apps/gotosocial.nix index 7edb04ac9df98..ecbf62fe8b6b8 100644 --- a/nixos/tests/web-apps/gotosocial.nix +++ b/nixos/tests/web-apps/gotosocial.nix @@ -13,6 +13,7 @@ settings = { host = "localhost:8081"; port = 8081; + instance-stats-mode = "serve"; }; }; }; @@ -21,9 +22,11 @@ machine.wait_for_unit("gotosocial.service") machine.wait_for_unit("postgresql.service") machine.wait_for_open_port(8081) + # Database migrations are running, wait until gotosocial no longer serves 503 + machine.wait_until_succeeds("curl -sS -f http://localhost:8081/readyz", timeout=300) # check user registration via cli machine.succeed("gotosocial-admin account create --username nickname --email email@example.com --password kurtz575VPeBgjVm") - machine.succeed("curl -sS -f http://localhost:8081/nodeinfo/2.0 | jq '.usage.users.total' | grep -q '^1$'") + machine.wait_until_succeeds("curl -sS -f http://localhost:8081/nodeinfo/2.0 | jq '.usage.users.total' | grep -q '^1$'") ''; }