From bf89f3c403163c0b46ec89cd1a2380ce6a1b50cd Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Sun, 21 Jun 2020 20:54:37 +0100 Subject: [PATCH] removed ADMIN_SECRET env var (no longer needed) --- packages/builder/cypress/plugins/index.js | 21 +++++++++++++++++++++ packages/builder/cypress/setup.js | 2 +- packages/server/.env.template | 3 --- packages/server/scripts/jestSetup.js | 1 - packages/server/src/environment.js | 1 - 5 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 packages/builder/cypress/plugins/index.js diff --git a/packages/builder/cypress/plugins/index.js b/packages/builder/cypress/plugins/index.js new file mode 100644 index 0000000000..aa9918d215 --- /dev/null +++ b/packages/builder/cypress/plugins/index.js @@ -0,0 +1,21 @@ +/// +// *********************************************************** +// This example plugins/index.js can be used to load plugins +// +// You can change the location of this file or turn off loading +// the plugins file with the 'pluginsFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/plugins-guide +// *********************************************************** + +// This function is called when a project is opened or re-opened (e.g. due to +// the project's config changing) + +/** + * @type {Cypress.PluginConfig} + */ +module.exports = (on, config) => { + // `on` is used to hook into various events Cypress emits + // `config` is the resolved Cypress config +} diff --git a/packages/builder/cypress/setup.js b/packages/builder/cypress/setup.js index 9682a07118..a6566237ce 100644 --- a/packages/builder/cypress/setup.js +++ b/packages/builder/cypress/setup.js @@ -11,7 +11,7 @@ const run = require("../../cli/src/commands/run/runHandler") rimraf.sync(homedir) -init({ dir: homedir }) +init({ dir: homedir, clientId: "cypress-test" }) .then(() => { run({ dir: homedir }) }) diff --git a/packages/server/.env.template b/packages/server/.env.template index 170d391520..f282d9c67f 100644 --- a/packages/server/.env.template +++ b/packages/server/.env.template @@ -5,9 +5,6 @@ COUCH_DB_URL={{couchDbUrl}} # identifies a client database - i.e. group of apps CLIENT_ID={{clientId}} -# Full access API key for server -ADMIN_SECRET={{adminSecret}} - # used to create cookie hashes JWT_SECRET={{cookieKey1}} diff --git a/packages/server/scripts/jestSetup.js b/packages/server/scripts/jestSetup.js index ab5bc83885..8fc7082554 100644 --- a/packages/server/scripts/jestSetup.js +++ b/packages/server/scripts/jestSetup.js @@ -4,5 +4,4 @@ process.env.NODE_ENV = "jest" process.env.JWT_SECRET = "test-jwtsecret" process.env.CLIENT_ID = "test-client-id" process.env.BUDIBASE_DIR = tmpdir("budibase-unittests") -process.env.ADMIN_SECRET = "test-admin-secret" process.env.LOG_LEVEL = "silent" diff --git a/packages/server/src/environment.js b/packages/server/src/environment.js index fdf8b9874a..9bab1ed1a0 100644 --- a/packages/server/src/environment.js +++ b/packages/server/src/environment.js @@ -3,7 +3,6 @@ module.exports = { NODE_ENV: process.env.NODE_ENV, JWT_SECRET: process.env.JWT_SECRET, BUDIBASE_DIR: process.env.BUDIBASE_DIR, - ADMIN_SECRET: process.env.ADMIN_SECRET, PORT: process.env.PORT, COUCH_DB_URL: process.env.COUCH_DB_URL, SALT_ROUNDS: process.env.SALT_ROUNDS,