Skip to content

Commit

Permalink
fix: update server host in GUI e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowusr committed Sep 22, 2023
1 parent d8f6150 commit 6e8afb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"e2e:build-browsers": "docker build -f test/func/docker/Dockerfile -t html-reporter-browsers:0.0.1 --network host test/func/docker",
"e2e:build-packages": "npm run --workspace=test/func/packages --if-present build",
"e2e:generate-fixtures": "npm run --workspace=test/func/fixtures generate",
"e2e:launch-browsers": "docker run -it --rm --network=host --add-host=host.docker.internal:127.0.0.1 html-reporter-browsers:0.0.1",
"e2e:launch-browsers": "docker run -it --rm --network=host --add-host=host.docker.internal:0.0.0.0 html-reporter-browsers:0.0.1",
"e2e:test": "npm run --workspace=test/func/tests test",
"e2e": "npm run e2e:build-packages && npm run e2e:generate-fixtures ; npm run e2e:test",
"lint": "eslint .",
Expand Down
4 changes: 3 additions & 1 deletion test/func/tests/common-gui/index.hermione.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ const treeKill = promisify(require('tree-kill'));
const {PORTS} = require('../../utils/constants');
const {getTestSectionByName} = require('../utils');

const serverHost = process.env.SERVER_HOST ?? 'host.docker.internal';

const projectName = process.env.PROJECT_UNDER_TEST;
const projectDir = path.resolve(__dirname, '../../fixtures', projectName);
const guiUrl = `http://host.docker.internal:${PORTS[projectName].gui}`;
const guiUrl = `http://${serverHost}:${PORTS[projectName].gui}`;

const reportDir = path.join(projectDir, 'report');
const reportBackupDir = path.join(projectDir, 'report-backup');
Expand Down

0 comments on commit 6e8afb9

Please sign in to comment.