mirror of https://github.com/portainer/portainer
feat(test): update e2e to support swarm and CI mode
parent
36de0aee7b
commit
07db1ca16e
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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…
Reference in New Issue