From e02867db22c0bda0e334d18b6adcc88cc5b3e3b7 Mon Sep 17 00:00:00 2001 From: Mourits de Beer <31511766+ff137@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:14:14 +0200 Subject: [PATCH] Revert ":art: resolve remaining repo code scanning warnings" (#1114) * Revert ":art: resolve remaining repo code scanning warnings (#1113)" This reverts commit 6a0091d0defe94adbb43279877efd625574eeccc. * :art: reduce arrow function complexity * :art: use property shorthand --- scripts/k6/main.js | 2 +- scripts/k6/scenarios/create-invitations.js | 2 +- scripts/k6/scenarios/create-issuers.js | 2 +- scripts/k6/scenarios/create-schemas.js | 2 +- scripts/k6/scenarios/delete-holders.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/k6/main.js b/scripts/k6/main.js index c148d51ed..5804a73f1 100644 --- a/scripts/k6/main.js +++ b/scripts/k6/main.js @@ -151,7 +151,7 @@ export function setup() { } } - return bearerToken, issuers; + return { bearerToken, issuers }; } // Helper function to calculate the wallet index based on VU and iteration diff --git a/scripts/k6/scenarios/create-invitations.js b/scripts/k6/scenarios/create-invitations.js index df913d347..4d764254c 100644 --- a/scripts/k6/scenarios/create-invitations.js +++ b/scripts/k6/scenarios/create-invitations.js @@ -76,7 +76,7 @@ export function setup() { console.error("Failed to bootstrap issuers."); } - return bearerToken, issuers, holders; + return { bearerToken, issuers, holders }; } function getIssuerIndex(vu, iter) { diff --git a/scripts/k6/scenarios/create-issuers.js b/scripts/k6/scenarios/create-issuers.js index cd705d9f6..991bde5bc 100644 --- a/scripts/k6/scenarios/create-issuers.js +++ b/scripts/k6/scenarios/create-issuers.js @@ -66,7 +66,7 @@ const wallets = new SharedArray("wallets", () => { export function setup() { const bearerToken = getBearerToken(); file.writeString(outputFilepath, ""); - return bearerToken; + return { bearerToken }; } const iterationsPerVU = options.scenarios.default.iterations; diff --git a/scripts/k6/scenarios/create-schemas.js b/scripts/k6/scenarios/create-schemas.js index f998dfe8c..770c56a6a 100644 --- a/scripts/k6/scenarios/create-schemas.js +++ b/scripts/k6/scenarios/create-schemas.js @@ -56,7 +56,7 @@ const schemas = new SharedArray("schemas", () => { export function setup() { file.writeString(outputFilepath, ""); const governanceBearerToken = getGovernanceBearerToken(); - return governanceBearerToken; // eslint-disable-line no-eval + return { governanceBearerToken }; // eslint-disable-line no-eval } const iterationsPerVU = options.scenarios.default.iterations; diff --git a/scripts/k6/scenarios/delete-holders.js b/scripts/k6/scenarios/delete-holders.js index 4660ff755..12c08176f 100644 --- a/scripts/k6/scenarios/delete-holders.js +++ b/scripts/k6/scenarios/delete-holders.js @@ -60,7 +60,7 @@ const filepath = "output/create-holders.json"; export function setup() { const bearerToken = getBearerToken(); - return bearerToken; + return { bearerToken }; } const iterationsPerVU = options.scenarios.default.iterations;