From 265ccf3682de2bb6bbe6f401f963dddced61d0a7 Mon Sep 17 00:00:00 2001 From: Severiano Badajoz Date: Thu, 13 May 2021 14:28:16 -0700 Subject: [PATCH] fix: use env specific secret (#2204) --- client/__tests__/globalSetup.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/__tests__/globalSetup.js b/client/__tests__/globalSetup.js index 8d6c7301..e5163056 100644 --- a/client/__tests__/globalSetup.js +++ b/client/__tests__/globalSetup.js @@ -7,8 +7,10 @@ const { setup } = require("jest-environment-puppeteer"); const client = new SecretsManagerClient({ region: "us-west-2" }); +const deploymentStage = process.env.DEPLOYMENT_STAGE || "test"; + const secretValueRequest = { - SecretId: "corpora/backend/dev/auth0-secret", + SecretId: `corpora/backend/${deploymentStage}/auth0-secret`, }; const command = new GetSecretValueCommand(secretValueRequest); @@ -21,5 +23,4 @@ module.exports = async () => { } catch (error) { console.error(error); } - console.log(process.env.TEST_ACCOUNT_PASS); };