From 3ca2f930a9a58d529a3cf1ae50b5c3b6c1b5d4b1 Mon Sep 17 00:00:00 2001 From: ibizaman Date: Wed, 17 Apr 2024 16:03:33 -0700 Subject: [PATCH] fix jackett test --- test/vm/arr.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/vm/arr.nix b/test/vm/arr.nix index 264e6fd..a14b75c 100644 --- a/test/vm/arr.nix +++ b/test/vm/arr.nix @@ -7,6 +7,8 @@ let shbapp = nodes.server.shb.arr.${appname}; hasSSL = !(isNull shbapp.ssl); fqdn = if hasSSL then "https://${appname}.example.com" else "http://${appname}.example.com"; + healthUrl = "/health"; + loginUrl = "/UI/Login"; in '' import json @@ -28,18 +30,21 @@ let "curl -X GET --fail-with-body --silent --show-error --output /dev/null --location" + " --connect-to ${appname}.example.com:443:server:443" + " --connect-to ${appname}.example.com:80:server:80" + + " --cookie-jar /tmp/cookies" + # Uncomment for debugging: + # + " -v" + f" --write-out '{format}'" + " " + endpoint )) with subtest("health"): - response = curl(client, """{"code":%{response_code}}""", "${fqdn}/health") + response = curl(client, """{"code":%{response_code}}""", "${fqdn}${healthUrl}") if response['code'] != 200: raise Exception(f"Code is {response['code']}") with subtest("login"): - response = curl(client, """{"code":%{response_code}}""", "${fqdn}/UI/Login") + response = curl(client, """{"code":%{response_code}}""", "${fqdn}${loginUrl}") if response['code'] != 200: raise Exception(f"Code is {response['code']}")