From 5bffa46e447834ad83b7e77f4813b583dc97b935 Mon Sep 17 00:00:00 2001 From: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com> Date: Fri, 4 Mar 2022 20:14:34 +0100 Subject: [PATCH] Extract hard coded embedding key for e2e tests and store it as a variable (#20852) --- frontend/test/__support__/e2e/cypress_data.js | 4 ++++ frontend/test/snapshot-creators/default.cy.snap.js | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/test/__support__/e2e/cypress_data.js b/frontend/test/__support__/e2e/cypress_data.js index ddf568cf521..5b586121b72 100644 --- a/frontend/test/__support__/e2e/cypress_data.js +++ b/frontend/test/__support__/e2e/cypress_data.js @@ -111,3 +111,7 @@ export const USERS = { group_ids: [ALL_USERS_GROUP], }, }; + +// Embedding +export const METABASE_SECRET_KEY = + "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"; diff --git a/frontend/test/snapshot-creators/default.cy.snap.js b/frontend/test/snapshot-creators/default.cy.snap.js index 32aa515acb8..46d3317acb0 100644 --- a/frontend/test/snapshot-creators/default.cy.snap.js +++ b/frontend/test/snapshot-creators/default.cy.snap.js @@ -5,6 +5,7 @@ import { USER_GROUPS, SAMPLE_DB_ID, SAMPLE_DB_TABLES, + METABASE_SECRET_KEY, } from "__support__/e2e/cypress_data"; const { @@ -68,7 +69,7 @@ describe("snapshots", () => { cy.request("PUT", "/api/setting/enable-public-sharing", { value: true }); cy.request("PUT", "/api/setting/enable-embedding", { value: true }); cy.request("PUT", "/api/setting/embedding-secret-key", { - value: "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + value: METABASE_SECRET_KEY, }); // update the Sample db connection string so it is valid in both CI and locally -- GitLab