Skip to content

Commit ac0074e

Browse files
committed
Cypress upgrade
1 parent 52bd7b1 commit ac0074e

File tree

13 files changed

+389
-284
lines changed

13 files changed

+389
-284
lines changed

Jenkinsfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@ pipeline {
2929
BUILD_COMMIT = getCommit()
3030
MAJOR_VERSION = '3'
3131
BRANCH_LOWER = "${BRANCH_NAME.toLowerCase().replaceAll('\\\\', '-').replaceAll('/', '-').replaceAll('\\.', '-')}"
32-
COMPOSE_PROJECT_NAME = "npm_${BRANCH_LOWER}_${BUILD_NUMBER}"
33-
COMPOSE_FILE = 'docker/docker-compose.ci.yml'
32+
BUILDX_NAME = "npm_${BRANCH_LOWER}_${BUILD_NUMBER}"
3433
COMPOSE_INTERACTIVE_NO_CLI = 1
35-
BUILDX_NAME = "${COMPOSE_PROJECT_NAME}"
3634
}
3735
stages {
3836
stage('Environment') {

docker/docker-compose.ci.mysql.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# WARNING: This is a CI docker-compose file used for building and testing of the entire app, it should not be used for production.
2-
version: '3.8'
32
services:
43

54
fullstack:

docker/docker-compose.ci.postgres.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# WARNING: This is a CI docker-compose file used for building and testing of the entire app, it should not be used for production.
2-
version: '3.8'
32
services:
43

54
fullstack:

docker/docker-compose.ci.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# WARNING: This is a CI docker-compose file used for building and testing of the entire app, it should not be used for production.
2-
version: '3.8'
1+
# WARNING: This is a CI docker-compose file used for building
2+
# and testing of the entire app, it should not be used for production.
33
services:
44

55
fullstack:
6-
image: ${IMAGE}:${BRANCH_LOWER}-ci-${BUILD_NUMBER}
6+
image: "${IMAGE}:${BRANCH_LOWER}-ci-${BUILD_NUMBER}"
77
environment:
88
NPM_DB_DRIVER: 'sqlite'
99
NPM_LOG_LEVEL: 'debug'
1010
NPM_LOG_FORMAT: 'json'
1111
NPM_DISABLE_IPV6: 'true'
1212
volumes:
1313
- '/etc/localtime:/etc/localtime:ro'
14-
- npm_data_ci:/data
15-
- ../docs:/temp-docs
16-
- ./dev/resolv.conf:/etc/resolv.conf:ro
14+
- 'npm_data_ci:/data'
15+
- '../docs:/temp-docs'
16+
- './dev/resolv.conf:/etc/resolv.conf:ro'
1717
networks:
1818
default:
1919
aliases:
@@ -67,7 +67,7 @@ services:
6767
MYSQL_USER: 'pdns'
6868
MYSQL_PASSWORD: 'pdns'
6969
volumes:
70-
- pdns_mysql_vol:/var/lib/mysql
70+
- 'pdns_mysql_vol:/var/lib/mysql'
7171
- '/etc/localtime:/etc/localtime:ro'
7272
- './dev/pdns-db.sql:/docker-entrypoint-initdb.d/01_init.sql:ro'
7373

@@ -77,18 +77,18 @@ services:
7777
- ./dev/dnsrouter-config.json.tmp:/dnsrouter-config.json:ro
7878

7979
cypress:
80-
image: ${IMAGE}-cypress:ci-${BUILD_NUMBER}
80+
image: "${IMAGE}-cypress:ci-${BUILD_NUMBER}"
8181
build:
8282
context: ../
8383
dockerfile: test/cypress/Dockerfile
8484
environment:
85-
CYPRESS_baseUrl: "http://fullstack:81"
85+
CYPRESS_baseUrl: 'http://fullstack:81'
8686
volumes:
87-
- cypress-logs:/results
88-
- ./dev/resolv.conf:/etc/resolv.conf:ro
89-
command: cypress run --browser chrome --config-file=${CYPRESS_CONFIG:-cypress/config/ci.js}
87+
- 'cypress_logs:/results'
88+
- './dev/resolv.conf:/etc/resolv.conf:ro'
89+
command: cypress run --browser chrome --config-file=cypress/config/ci.js
9090

9191
volumes:
92-
cypress-logs:
92+
cypress_logs:
9393
npm_data_ci:
9494
pdns_mysql_vol:

docker/docker-compose.dev.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# WARNING: This is a DEVELOPMENT docker-compose file used for development of the entire app, it should not be used for production.
2-
version: '3.8'
32
services:
43

54
npm:

scripts/ci/fulltest-cypress

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ rm -rf "${LOCAL_RESOLVE}"
5858
printf "nameserver %s\noptions ndots:0" "${DNSROUTER_IP}" > "${LOCAL_RESOLVE}"
5959

6060
# bring up all remaining containers, except cypress!
61-
docker-compose up -d --remove-orphans fullstack stepca
61+
docker-compose up -d --remove-orphans stepca
62+
docker-compose up -d --remove-orphans --pull=never fullstack
6263

6364
# wait for main container to be healthy
6465
bash "$DIR/../wait-healthy" "$(docker-compose ps --all -q fullstack)" 120

test/cypress/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM cypress/included:12.13.0
1+
FROM cypress/included:13.9.0
22

33
COPY --chown=1000 ./test /test
44

test/cypress/config/ci.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ module.exports = defineConfig({
77
reporterOptions: {
88
configFile: 'multi-reporter.json'
99
},
10+
video: true,
1011
videosFolder: 'results/videos',
1112
screenshotsFolder: 'results/screenshots',
12-
env: {
13-
swaggerBase: '{{baseUrl}}/api/schema',
14-
RETRIES: 4
15-
},
16-
e2e: {
13+
e2e: {
1714
setupNodeEvents(on, config) {
1815
return require('../plugins/index.js')(on, config);
1916
},
20-
}
17+
env: {
18+
swaggerBase: '{{baseUrl}}/api/schema',
19+
},
20+
baseUrl: 'http://localhost:1234',
21+
},
2122
});

test/cypress/config/dev.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@ module.exports = defineConfig({
77
reporterOptions: {
88
configFile: 'multi-reporter.json'
99
},
10-
videos: false,
10+
video: false,
1111
screenshotsFolder: 'results/screenshots',
12-
env: {
13-
swaggerBase: '{{baseUrl}}/api/schema',
14-
RETRIES: 0
15-
},
16-
e2e: {
17-
// baseUrl: '{{baseUrl}}',
12+
e2e: {
1813
setupNodeEvents(on, config) {
1914
return require('../plugins/index.js')(on, config);
2015
},
16+
env: {
17+
swaggerBase: '{{baseUrl}}/api/schema',
18+
},
2119
}
2220
});

test/cypress/fixtures/example.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)