From 765d9dcf4aeabd47c4dd3a2c94e057ec0d298463 Mon Sep 17 00:00:00 2001 From: Radoslav Bodo Date: Thu, 23 Jun 2022 23:58:22 +0200 Subject: [PATCH] tests: update heavy ratelimit helper to apiv2 --- tests/test_heavy_ratelimit.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_heavy_ratelimit.sh b/tests/test_heavy_ratelimit.sh index db7d7fb8..15fa15ba 100644 --- a/tests/test_heavy_ratelimit.sh +++ b/tests/test_heavy_ratelimit.sh @@ -1,5 +1,7 @@ #!/bin/bash # This file is part of sner4 project governed by MIT license, see the LICENSE.txt file. +SERVER=$1 + APIKEY=$(bin/server auth add-agent | rev | awk '{print $1}' | rev) -while true; do time curl -H "Authorization: Apikey $APIKEY" http://localhost:18000/api/scheduler/job/assign | grep '{}' && break; done +while true; do time curl -XPOST -H "X-API-KEY: $APIKEY" "${SERVER}/api/v2/scheduler/job/assign" | grep '{}' && break; done