Skip to content

Commit 691ad1e

Browse files
authored
e2e improvements (#2021)
* @sanderegg use our registry-auth * @sanderegg listen all addresses * Allow demo mode in portal e2e
1 parent c0cc3b5 commit 691ad1e

File tree

11 files changed

+102
-69
lines changed

11 files changed

+102
-69
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ CPU_COUNT = $(shell cat /proc/cpuinfo | grep processor | wc -l )
199199
.deploy-ops: .stack-ops.yml
200200
# Deploy stack 'ops'
201201
ifndef ops_disabled
202-
@docker stack deploy -c $< ops
202+
@docker stack deploy --with-registry-auth -c $< ops
203203
else
204204
@echo "Explicitly disabled with ops_disabled flag in CLI"
205205
endif
@@ -209,15 +209,15 @@ up-devel: .stack-simcore-development.yml .init-swarm $(CLIENT_WEB_OUTPUT) ## Dep
209209
# Start compile+watch front-end container [front-end]
210210
$(MAKE_C) services/web/client down compile-dev flags=--watch
211211
# Deploy stack $(SWARM_STACK_NAME) [back-end]
212-
@docker stack deploy -c $< $(SWARM_STACK_NAME)
212+
@docker stack deploy --with-registry-auth -c $< $(SWARM_STACK_NAME)
213213
$(MAKE) .deploy-ops
214214
$(MAKE_C) services/web/client follow-dev-logs
215215

216216

217217
up-prod: .stack-simcore-production.yml .init-swarm ## Deploys local production stack and ops stack (pass 'make ops_disabled=1 up-...' to disable or target=<service-name> to deploy a single service)
218218
ifeq ($(target),)
219219
# Deploy stack $(SWARM_STACK_NAME)
220-
@docker stack deploy -c $< $(SWARM_STACK_NAME)
220+
@docker stack deploy --with-registry-auth -c $< $(SWARM_STACK_NAME)
221221
$(MAKE) .deploy-ops
222222
else
223223
# deploys ONLY $(target) service
@@ -226,7 +226,7 @@ endif
226226

227227
up-version: .stack-simcore-version.yml .init-swarm ## Deploys versioned stack '$(DOCKER_REGISTRY)/{service}:$(DOCKER_IMAGE_TAG)' and ops stack (pass 'make ops_disabled=1 up-...' to disable)
228228
# Deploy stack $(SWARM_STACK_NAME)
229-
@docker stack deploy -c $< $(SWARM_STACK_NAME)
229+
@docker stack deploy --with-registry-auth -c $< $(SWARM_STACK_NAME)
230230
$(MAKE) .deploy-ops
231231

232232
up-latest:

services/docker-compose.local.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ services:
7878
"log_duration=true",
7979
"-c",
8080
"log_line_prefix=%m [%p] %q%u@%d/%a ",
81+
"-c",
82+
"listen_addresses=\"*\"",
8183
]
8284

8385
rabbit:

tests/e2e/portal/2D_Plot.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1-
// node 2D_Plot.js [url_prefix] [template_uuid]
1+
// node 2D_Plot.js [url_prefix] [template_uuid] [--demo]
22

33
const tutorialBase = require('../tutorials/tutorialBase');
44
const auto = require('../utils/auto');
55
const utils = require('../utils/utils');
66

77
const args = process.argv.slice(2);
8-
if (args.length < 1) {
9-
process.exit(1);
10-
}
11-
const URL = args[0];
12-
const TEMPLATE_UUID = args[1];
13-
const anonURL = URL + TEMPLATE_UUID;
8+
const {
9+
urlPrefix,
10+
templateUuid,
11+
enableDemoMode
12+
} = utils.parseCommandLineArgumentsTemplate(args);
13+
14+
const anonURL = urlPrefix + templateUuid;
1415
const screenshotPrefix = "2DPlot_";
1516

1617

1718
async function runTutorial () {
18-
const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix);
19+
const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix, null, null, null, enableDemoMode);
1920

2021
tutorial.startScreenshooter();
2122
const page = await tutorial.beforeScript();

tests/e2e/portal/3D_Anatomical.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
// node 3D_Anatomical.js [url_prefix] [template_uuid]
1+
// node 3D_Anatomical.js [url_prefix] [template_uuid] [--demo]
22

33
const tutorialBase = require('../tutorials/tutorialBase');
44
const utils = require('../utils/utils');
55

66
const args = process.argv.slice(2);
7-
if (args.length < 1) {
8-
process.exit(1);
9-
}
10-
const URL = args[0];
11-
const TEMPLATE_UUID = args[1];
12-
const anonURL = URL + TEMPLATE_UUID;
7+
const {
8+
urlPrefix,
9+
templateUuid,
10+
enableDemoMode
11+
} = utils.parseCommandLineArgumentsTemplate(args);
12+
13+
const anonURL = urlPrefix + templateUuid;
1314
const screenshotPrefix = "3DAnatomical_";
1415

1516

1617
async function runTutorial () {
17-
const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix);
18+
const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix, null, null, null, enableDemoMode);
1819

1920
tutorial.startScreenshooter();
2021
const page = await tutorial.beforeScript();

tests/e2e/portal/3D_EM.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
// node 3D_EM.js [url_prefix] [template_uuid]
1+
// node 3D_EM.js [url_prefix] [template_uuid] [--demo]
22

33
const tutorialBase = require('../tutorials/tutorialBase');
44
const utils = require('../utils/utils');
55

66
const args = process.argv.slice(2);
7-
if (args.length < 1) {
8-
process.exit(1);
9-
}
10-
const URL = args[0];
11-
const TEMPLATE_UUID = args[1];
12-
const anonURL = URL + TEMPLATE_UUID;
7+
const {
8+
urlPrefix,
9+
templateUuid,
10+
enableDemoMode
11+
} = utils.parseCommandLineArgumentsTemplate(args);
12+
13+
const anonURL = urlPrefix + templateUuid;
1314
const screenshotPrefix = "3DEM_";
1415

1516

1617
async function runTutorial () {
17-
const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix);
18+
const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix, null, null, null, enableDemoMode);
1819

1920
tutorial.startScreenshooter();
2021
const page = await tutorial.beforeScript();

tests/e2e/portal/Bornstein.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
// node Bornstein.js [url_prefix] [template_uuid]
1+
// node Bornstein.js [url_prefix] [template_uuid] [--demo]
22

33
const tutorialBase = require('../tutorials/tutorialBase');
44
const utils = require('../utils/utils');
55

66
const args = process.argv.slice(2);
7-
if (args.length < 1) {
8-
process.exit(1);
9-
}
10-
const URL = args[0];
11-
const TEMPLATE_UUID = args[1];
12-
const anonURL = URL + TEMPLATE_UUID;
7+
const {
8+
urlPrefix,
9+
templateUuid,
10+
enableDemoMode
11+
} = utils.parseCommandLineArgumentsTemplate(args);
12+
13+
const anonURL = urlPrefix + templateUuid;
1314
const screenshotPrefix = "Bornstein_";
1415

1516

1617
async function runTutorial () {
17-
const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix);
18+
const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix, null, null, null, enableDemoMode);
1819

1920
tutorial.startScreenshooter();
2021
const page = await tutorial.beforeScript();

tests/e2e/portal/CC_Human.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
// node CC_Human.js [url_prefix] [template_uuid]
1+
// node CC_Human.js [url_prefix] [template_uuid] [--demo]
22

33
const tutorialBase = require('../tutorials/tutorialBase');
44
const utils = require('../utils/utils');
55

66
const args = process.argv.slice(2);
7-
if (args.length < 1) {
8-
process.exit(1);
9-
}
10-
const URL = args[0];
11-
const TEMPLATE_UUID = args[1];
12-
const anonURL = URL + TEMPLATE_UUID;
7+
const {
8+
urlPrefix,
9+
templateUuid,
10+
enableDemoMode
11+
} = utils.parseCommandLineArgumentsTemplate(args);
12+
13+
const anonURL = urlPrefix + templateUuid;
1314
const screenshotPrefix = "CCHuman_";
1415

1516

1617
async function runTutorial () {
17-
const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix);
18+
const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix, null, null, null, enableDemoMode);
1819

1920
tutorial.startScreenshooter();
2021
const page = await tutorial.beforeScript();

tests/e2e/portal/CC_Rabbit.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
// node CC_Rabbit.js [url_prefix] [template_uuid]
1+
// node CC_Rabbit.js [url_prefix] [template_uuid] [--demo]
22

33
const tutorialBase = require('../tutorials/tutorialBase');
44
const utils = require('../utils/utils');
55

66
const args = process.argv.slice(2);
7-
if (args.length < 1) {
8-
process.exit(1);
9-
}
10-
const URL = args[0];
11-
const TEMPLATE_UUID = args[1];
12-
const anonURL = URL + TEMPLATE_UUID;
7+
const {
8+
urlPrefix,
9+
templateUuid,
10+
enableDemoMode
11+
} = utils.parseCommandLineArgumentsTemplate(args);
12+
13+
const anonURL = urlPrefix + templateUuid;
1314
const screenshotPrefix = "CCRabbit_";
1415

1516

1617
async function runTutorial () {
17-
const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix);
18+
const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix, null, null, null, enableDemoMode);
1819

1920
tutorial.startScreenshooter();
2021
const page = await tutorial.beforeScript();

tests/e2e/portal/Mattward.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
// node Mattward.js [url_prefix] [template_uuid]
1+
// node Mattward.js [url_prefix] [template_uuid] [--demo]
22

33
const tutorialBase = require('../tutorials/tutorialBase');
44
const utils = require('../utils/utils');
55

66
const args = process.argv.slice(2);
7-
if (args.length < 1) {
8-
process.exit(1);
9-
}
10-
const URL = args[0];
11-
const TEMPLATE_UUID = args[1];
12-
const anonURL = URL + TEMPLATE_UUID;
7+
const {
8+
urlPrefix,
9+
templateUuid,
10+
enableDemoMode
11+
} = utils.parseCommandLineArgumentsTemplate(args);
12+
13+
const anonURL = urlPrefix + templateUuid;
1314
const screenshotPrefix = "Mattward_";
1415

1516

1617
async function runTutorial () {
17-
const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix);
18+
const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix, null, null, null, enableDemoMode);
1819

1920
tutorial.startScreenshooter();
2021
const page = await tutorial.beforeScript();

tests/e2e/portal/opencor.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
// node opencor.js [url_prefix] [template_uuid]
1+
// node opencor.js [url_prefix] [template_uuid] [--demo]
22

33
const tutorialBase = require('../tutorials/tutorialBase');
44
const utils = require('../utils/utils');
55

66
const args = process.argv.slice(2);
7-
if (args.length < 1) {
8-
process.exit(1);
9-
}
10-
const URL = args[0];
11-
const TEMPLATE_UUID = args[1];
12-
const anonURL = URL + TEMPLATE_UUID + "?stimulation_mode=1&stimulation_level=0.5";
7+
const {
8+
urlPrefix,
9+
templateUuid,
10+
enableDemoMode
11+
} = utils.parseCommandLineArgumentsTemplate(args);
12+
13+
const anonURL = urlPrefix + templateUuid + "?stimulation_mode=1&stimulation_level=0.5";
1314
const screenshotPrefix = "Opencor_";
1415

1516

1617
async function runTutorial () {
17-
const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix);
18+
const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix, null, null, null, enableDemoMode);
1819

1920
tutorial.startScreenshooter();
2021
const page = await tutorial.beforeScript();

0 commit comments

Comments
 (0)