From a831e7bb539da869265b77b74c8cff1c5b847554 Mon Sep 17 00:00:00 2001 From: Le Roux Bodenstein Date: Thu, 23 Jan 2025 17:32:23 +0000 Subject: [PATCH] chore: setup auto-update when testing auto-update, even in CI. (#6651) Setup auto-update when testing auto-update, even in CI. --- packages/compass-e2e-tests/helpers/compass.ts | 6 ++++-- packages/compass/src/main/application.ts | 4 +--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/compass-e2e-tests/helpers/compass.ts b/packages/compass-e2e-tests/helpers/compass.ts index 1f17ed7748b..0395fd8e6fc 100644 --- a/packages/compass-e2e-tests/helpers/compass.ts +++ b/packages/compass-e2e-tests/helpers/compass.ts @@ -636,8 +636,10 @@ async function startCompassElectron( process.env.APP_ENV = 'webdriverio'; // For webdriverio env we are changing appName so that keychain records do not - // overlap with anything else - process.env.HADRON_PRODUCT_NAME_OVERRIDE = 'MongoDB Compass WebdriverIO'; + // overlap with anything else. But leave it alone when testing auto-update. + if (!process.env.HADRON_AUTO_UPDATE_ENDPOINT_OVERRIDE) { + process.env.HADRON_PRODUCT_NAME_OVERRIDE = 'MongoDB Compass WebdriverIO'; + } // Guide cues might affect too many tests in a way where the auto showing of the cue prevents // clicks from working on elements. Dealing with this case-by-case is way too much work, so diff --git a/packages/compass/src/main/application.ts b/packages/compass/src/main/application.ts index be6e8e8e605..4166c9bfdf4 100644 --- a/packages/compass/src/main/application.ts +++ b/packages/compass/src/main/application.ts @@ -160,9 +160,7 @@ class CompassApplication { await this.setupCORSBypass(); void this.setupCompassAuthService(); - // TODO(COMPASS-7618): For now don't setup auto-update in CI because the - // toasts will obscure other things which we don't expect yet. - if (!process.env.CI) { + if (!process.env.CI || process.env.HADRON_AUTO_UPDATE_ENDPOINT_OVERRIDE) { this.setupAutoUpdate(); } await setupCSFLELibrary();