Skip to content

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

Gdgt 3146 remap cypress maildev ports so they don't conflict with app maildev

Jakub Chodorowicz89da67a9f322
diff --git a/.github/actions/e2e-prepare-containers/action.yml b/.github/actions/e2e-prepare-containers/action.yml
index 6fce32763e2..1c83fa8b0b8 100644
--- a/.github/actions/e2e-prepare-containers/action.yml
+++ b/.github/actions/e2e-prepare-containers/action.yml
@@ -93,8 +93,8 @@ runs:
if ${{ inputs.maildev }}; then
echo -e "${Y}checking maildev container..." &&
- while ! nc -z localhost 1080; do sleep 1; done &&
- while ! nc -z localhost 1025; do sleep 1; done &&
+ while ! nc -z localhost 1180; do sleep 1; done &&
+ while ! nc -z localhost 1125; do sleep 1; done &&
echo -e "${G}Maildev is up and running!"
echo -e "${Y}checking maildev-ssl container..." &&
diff --git a/docs/developers-guide/e2e-tests.md b/docs/developers-guide/e2e-tests.md
index 2ed83b48ca4..1fa2f816c25 100644
--- a/docs/developers-guide/e2e-tests.md
+++ b/docs/developers-guide/e2e-tests.md
@@ -171,9 +171,11 @@ We have a few helpers for dealing with tests involving snowplow
Some of our tests depend on the email being set up, and require a local SMTP server. We use `maildev` Docker image for that purpose. At the time of this writing the image we use is `maildev/maildev:2.1.0`. The default cypress configuration for local development will handle this for you. If you want to set it up manually, you can use this command:
```sh
-docker run -d -p 1080:1080 -p 1025:1025 maildev/maildev:latest
+docker run -d -p 1180:1080 -p 1125:1025 maildev/maildev:2.2.1
```
+The e2e maildev is published on host ports 1180 (web UI) and 1125 (SMTP) on purpose. These differ, on purpose, from the 1080/1025 used for development.
+
### Running tests that require translation dictionaries
Some of the tests are checking content translation functionality. These tests require to run `./bin/i18n/build-translation-resources` command before running the tests to precompile JSON files with translations.
diff --git a/e2e/support/cypress_data.js b/e2e/support/cypress_data.js
index bb149a4afcb..c49c0a2cdf0 100644
--- a/e2e/support/cypress_data.js
+++ b/e2e/support/cypress_data.js
@@ -230,6 +230,6 @@ export const WRITABLE_DB_CONFIG = {
};
export const WEBMAIL_CONFIG = {
- WEB_PORT: 1080,
- SMTP_PORT: 1025,
+ WEB_PORT: 1180,
+ SMTP_PORT: 1125,
};
diff --git a/e2e/support/helpers/e2e-email-helpers.js b/e2e/support/helpers/e2e-email-helpers.js
index cc7beb94c57..150c004e195 100644
--- a/e2e/support/helpers/e2e-email-helpers.js
+++ b/e2e/support/helpers/e2e-email-helpers.js
@@ -11,10 +11,11 @@ const INBOX_INTERVAL = 100;
const { WEB_PORT, SMTP_PORT } = WEBMAIL_CONFIG;
/**
- * Make sure you have webmail Docker image running locally:
- * `docker run -d -p 1080:1080 -p 1025:1025 maildev/maildev:2.0.5`
+ * `bun run test-cypress` starts maildev for you via
+ * e2e/test/scenarios/docker-compose.yml. To start it manually instead:
+ * `docker run -d -p 1180:1080 -p 1125:1025 maildev/maildev:2.2.1`
* or
- * `npx maildev -s 1025 -w 1080`
+ * `npx maildev -s 1125 -w 1180`
*/
export const setupSMTP = () => {
cy.log("Set up Webmail SMTP server");
diff --git a/e2e/test/scenarios/docker-compose.yml b/e2e/test/scenarios/docker-compose.yml
index e331353ec8b..686fc8f09dc 100644
--- a/e2e/test/scenarios/docker-compose.yml
+++ b/e2e/test/scenarios/docker-compose.yml
@@ -31,9 +31,10 @@ services:
maildev:
image: maildev/maildev:2.2.1
+ ## Host ports deliberately differ from the 1080/1025 used for development
ports:
- - "1080:1080"
- - "1025:1025"
+ - "1180:1080"
+ - "1125:1025"
maildev-ssl:
## NOTE: Using this requires a root CA certificate to be added to the Java keystore.