File tree 8 files changed +31
-29
lines changed
8 files changed +31
-29
lines changed Original file line number Diff line number Diff line change @@ -12,16 +12,3 @@ services:
12
12
- ./:/var/www
13
13
environment :
14
14
- PYTHONUNBUFFERED=1
15
- e2e-tests :
16
- build :
17
- dockerfile : dockerfiles/e2e-tests/Dockerfile
18
- context : .
19
- volumes :
20
- - ./:/var/www
21
- working_dir : /var/www
22
- environment :
23
- - BASE_URL=http://app:8080
24
- - ipc=host
25
- depends_on :
26
- - app
27
-
Original file line number Diff line number Diff line change 1
1
FROM mcr.microsoft.com/playwright:v1.22.2-focal
2
2
3
+ RUN apt-get update
4
+ RUN apt-get -y install python3.8 python3-pip git ruby-dev
5
+
6
+ RUN gem install kramdown -v 1.14.0
7
+
3
8
WORKDIR /var/www
4
9
5
- COPY package.json yarn.lock ./
10
+ COPY requirements.txt ./
11
+ RUN pip install -r requirements.txt
6
12
13
+ COPY package.json yarn.lock ./
7
14
RUN yarn install --frozen-lockfile
8
15
9
16
COPY playwright.config.js .
10
- COPY test test
17
+ COPY . .
18
+
19
+ RUN yarn build
20
+
21
+ EXPOSE 8080
11
22
12
- ENTRYPOINT ["tail " , "-f" , "/dev/null " ]
23
+ ENTRYPOINT ["python3.8 " , "kotlin-website.py " ]
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ const config = {
8
8
use : {
9
9
baseURL : process . env . BASE_URL || 'http://localhost:9000' ,
10
10
trace : 'off' ,
11
+ ignoreHTTPSErrors : true ,
11
12
} ,
12
13
projects : [
13
14
{
@@ -16,12 +17,6 @@ const config = {
16
17
...devices [ 'Desktop Chrome' ] ,
17
18
} ,
18
19
} ,
19
- {
20
- name : 'webkit' ,
21
- use : {
22
- ...devices [ 'iPhone SE' ] ,
23
- } ,
24
- }
25
20
] ,
26
21
} ;
27
22
Original file line number Diff line number Diff line change @@ -8,6 +8,4 @@ echo "Waiting for the $BASE_URL response"
8
8
9
9
./scripts/test/wait-for-endpoint.sh " $BASE_URL "
10
10
11
- echo " The connection established"
12
-
13
11
yarn run test:e2e:ci
Original file line number Diff line number Diff line change 2
2
set -e
3
3
set +x
4
4
set -o pipefail
5
+ set -u
5
6
6
7
cd " $( pwd) " || exit 1
7
8
8
- APP_CONTAINER_NAME=" $( docker ps --format " {{.Names}} " --filter= " name=_e2e-tests_ " ) "
9
+ APP_CONTAINER_NAME=" kotlin-web-site_test-app "
9
10
10
11
docker exec -i " $APP_CONTAINER_NAME " /bin/bash -c " ./scripts/test/run-e2e.sh"
Original file line number Diff line number Diff line change 2
2
set -e
3
3
set +x
4
4
set -o pipefail
5
+ set -u
5
6
6
- docker-compose stop
7
+ APP_CONTAINER_NAME=" kotlin-web-site_test-app"
8
+
9
+ docker stop " $APP_CONTAINER_NAME "
10
+ docker rm " $APP_CONTAINER_NAME "
Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /usr/ bin/env bash
2
2
set -e
3
3
set +x
4
4
set -o pipefail
5
+ set -u
5
6
6
- docker-compose up -d --build
7
+ cd " $( pwd) " || exit 1
8
+
9
+ APP_CONTAINER_NAME=" kotlin-web-site_test-app"
10
+
11
+ docker build -t " $APP_CONTAINER_NAME " -f ./dockerfiles/e2e-tests/Dockerfile .
12
+
13
+ docker run -d -p 8080:8080 -e BASE_URL=http://localhost:8080 -e ipc=host --name " $APP_CONTAINER_NAME " " $APP_CONTAINER_NAME "
Original file line number Diff line number Diff line change 3
3
# Waits until request to given URI returns 200 or timeout threshold is reached.
4
4
# Can be given a command to run when done waiting.
5
5
#
6
-
7
6
SCRIPT_NAME=${0##*/ }
8
7
9
8
echoerr () { if [[ $QUIET -ne 1 ]]; then echo " $@ " 1>&2 ; fi }
You can’t perform that action at this time.
0 commit comments