From 2575b540faf73340afa56f0a8cd3b48aaf1c968b Mon Sep 17 00:00:00 2001 From: Marc 'risson' Schmitt Date: Mon, 15 Apr 2024 15:06:29 +0200 Subject: [PATCH] proper url tags Signed-off-by: Marc 'risson' Schmitt --- tests/benchmark/login.js | 2 +- tests/benchmark/provider_oauth2.js | 6 +++--- tests/benchmark/user_list.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/benchmark/login.js b/tests/benchmark/login.js index e6ccaa3718..ebd802c4c8 100644 --- a/tests/benchmark/login.js +++ b/tests/benchmark/login.js @@ -25,7 +25,7 @@ export const options = { export default function () { const domain = __ENV.DOMAIN; - const url = `http://${domain}.${host}:9000/api/v3/flows/executor/default-authentication-flow/`; + const url = http.url`http://${domain}.${host}:9000/api/v3/flows/executor/default-authentication-flow/`; const cookieJar = new http.CookieJar(); const params = { jar: cookieJar, diff --git a/tests/benchmark/provider_oauth2.js b/tests/benchmark/provider_oauth2.js index 1f3aa845d4..24d42fb637 100644 --- a/tests/benchmark/provider_oauth2.js +++ b/tests/benchmark/provider_oauth2.js @@ -56,7 +56,7 @@ export function setup() { const group_policies_count = testcase[1]; const expression_policies_count = testcase[2]; const domain = `provider-oauth2-${user_policies_count}-${group_policies_count}-${expression_policies_count}.${host}:9000`; - const url = `http://${domain}/api/v3/flows/executor/default-authentication-flow/`; + const url = http.url`http://${domain}/api/v3/flows/executor/default-authentication-flow/`; const params = { headers: { "Content-Type": "application/json", @@ -154,7 +154,7 @@ export default function (data) { code_challenge_method: "S256", }; - let url = `http://${domain}/application/o/authorize/?${Object.entries( + let url = http.url`http://${domain}/application/o/authorize/?${Object.entries( urlParams, ) .map((kv) => kv.map(encodeURIComponent).join("=")) @@ -168,7 +168,7 @@ export default function (data) { return; } - url = `http://${domain}/api/v3/flows/executor/default-provider-authorization-implicit-consent/`; + url = http.url`http://${domain}/api/v3/flows/executor/default-provider-authorization-implicit-consent/`; res = http.get(url, params); check(res, { "status is 200": (res) => res.status === 200, diff --git a/tests/benchmark/user_list.js b/tests/benchmark/user_list.js index 6bc1562ea9..26ce55c005 100644 --- a/tests/benchmark/user_list.js +++ b/tests/benchmark/user_list.js @@ -73,7 +73,7 @@ export default function () { for (let page = 1; page <= pages; page++) { requests.push([ "GET", - `http://${domain}/api/v3/core/users/?page=${page}&page_size=${page_size}&include_groups=${with_groups}`, + http.url`http://${domain}/api/v3/core/users/?page=${page}&page_size=${page_size}&include_groups=${with_groups}`, null, { headers: {