Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Unset the premium token for E2E tests (#68533)

Nemanja Glumac7d18a1b5a653
diff --git a/deps.edn b/deps.edn
index a93a40bff00..744bdf52c4e 100644
--- a/deps.edn
+++ b/deps.edn
@@ -362,6 +362,8 @@
"-Dmb.dangerous.unsafe.enable.testing.h2.connections.do.not.enable=true"
;; Ignore connection URI in favor of the MB_DB_FILE
"-Dmb.db.connection.uri="
+ ;; Unset the premium token so that tests can set it programmatically
+ "-Dmb.premium.embedding.token="
;; Ignore config.yml
"-Dmb.config.file.path=__cypress__"
;; We use Snowplow micro in e2e tests
diff --git a/e2e/runner/run_cypress_local.ts b/e2e/runner/run_cypress_local.ts
index 5b5f1cf23a5..3c571603fa9 100644
--- a/e2e/runner/run_cypress_local.ts
+++ b/e2e/runner/run_cypress_local.ts
@@ -17,6 +17,9 @@ const options = {
GENERATE_SNAPSHOTS: true,
JAR_PATH: undefined,
...booleanify(process.env),
+ // If this token is present in your env when Cypress runs, it's a mistake.
+ // Cypress needs to start from a clean slate in order to set the token programmatically.
+ MB_PREMIUM_EMBEDDING_TOKEN: undefined,
};
process.env = unBooleanify(options);