THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

feat(test): update e2e to support swarm and CI mode

tags/1.23.0^2
Anthony Lapenna 3 months ago
parent
commit
07db1ca16e
3 changed files with 26 additions and 4 deletions
  1. +17
    -0
      test/e2e/docker-compose.ci.yml
  2. +1
    -2
      test/e2e/docker-compose.yml
  3. +8
    -2
      test/e2e/run-e2e.sh

+ 17
- 0
test/e2e/docker-compose.ci.yml View File

@@ -0,0 +1,17 @@
version: '3'
services:
cypress:
image: cypress/included:3.5.0
container_name: e2e-cypress
command: --record --browser chrome
depends_on:
- portainer
working_dir: /e2e
environment:
CYPRESS_baseUrl: http://e2e-portainer:9000
CYPRESS_RECORD_KEY: ${CYPRESS_RECORD_KEY}
volumes:
- ./cypress:/e2e/cypress
- ./cypress.json:/e2e/cypress.json
networks:
- e2e-ci

+ 1
- 2
test/e2e/docker-compose.yml View File

@@ -11,13 +11,12 @@ services:
cypress:
image: cypress/included:3.5.0
container_name: e2e-cypress
# command: --record --browser chrome
command: --browser chrome
depends_on:
- portainer
working_dir: /e2e
environment:
CYPRESS_baseUrl: http://e2e-portainer:9000
# CYPRESS_RECORD_KEY:
volumes:
- ./cypress:/e2e/cypress
- ./cypress.json:/e2e/cypress.json


+ 8
- 2
test/e2e/run-e2e.sh View File

@@ -19,5 +19,11 @@ exec_in worker1 docker swarm join --token $TOKEN_WORKER manager1:2377
# Worker2 join
exec_in worker2 docker swarm join --token $TOKEN_WORKER manager1:2377

# Up portainer
docker-compose up --exit-code-from cypress
# Run portainer + cypress
# Use export CI=1 to run in CI mode
if [ -z "${CI}" ];
then
docker-compose up --exit-code-from cypress
else
docker-compose -f docker-compose.yml -f docker-compose.ci.yml up --exit-code-from cypress
fi

Loading…
Cancel
Save