diff --git a/packages/health-check/bin/cli b/packages/health-check/bin/cli index 5788b0be..dbf39344 100755 --- a/packages/health-check/bin/cli +++ b/packages/health-check/bin/cli @@ -16,16 +16,6 @@ require("yargs/yargs")(process.argv.slice(2)) console.log(await getAuthCookie(true)); } ) - .command( - "apikey", - "Get test user's API key", - () => {}, - async () => { - const { getAPIKey } = require("../src/utils"); - - console.log(await getAPIKey()); - } - ) .command( "enable", "Mark portal as enabled", diff --git a/packages/health-check/src/utils.js b/packages/health-check/src/utils.js index 929fae5f..00e8f86d 100644 --- a/packages/health-check/src/utils.js +++ b/packages/health-check/src/utils.js @@ -61,19 +61,6 @@ function getRequiredEnvironmentVariable(name) { return value; } -/** - * Fetches test user's API key from the environment. Raises an error if that - * is not possible. - * @returns {string} API key - */ -function getAPIKey() { - const apiKey = getRequiredEnvironmentVariable("ACCOUNTS_TEST_USER_API_KEY"); - if (!apiKey) { - throw new Error("Missing or empty environment variable ACCOUNTS_TEST_USER_API_KEY."); - } - return apiKey; -} - /** * Authenticate with given credentials and return auth cookie * Creates new account if username does not exist