Skip to content

Commit 47b4e79

Browse files
committed
fix(e2e): run test on local machine
1 parent dea6a2c commit 47b4e79

File tree

5 files changed

+16
-2
lines changed

5 files changed

+16
-2
lines changed

docker-compose.document.ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ services:
2626
build:
2727
context: .
2828
dockerfile: document.e2e.Dockerfile
29+
env_file:
30+
- env-example-document

docker-compose.relational.ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ services:
2626
build:
2727
context: .
2828
dockerfile: relational.e2e.Dockerfile
29+
env_file:
30+
- env-example-relational

docs/tests.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
- [Unit Tests](#unit-tests)
66
- [E2E Tests](#e2e-tests)
77
- [Tests in Docker](#tests-in-docker)
8+
- [For relational database](#for-relational-database)
9+
- [For document database](#for-document-database)
810

911
## Unit Tests
1012

@@ -20,10 +22,18 @@ npm run test:e2e
2022

2123
## Tests in Docker
2224

25+
### For relational database
26+
2327
```bash
2428
docker compose -f docker-compose.relational.ci.yaml --env-file env-example-relational -p ci up --build --exit-code-from api && docker compose -p ci rm -svf
2529
```
2630

31+
### For document database
32+
33+
```bash
34+
docker compose -f docker-compose.document.ci.yaml --env-file env-example-document -p ci up --build --exit-code-from api && docker compose -p ci rm -svf
35+
```
36+
2737
---
2838

2939
Previous: [File uploading](file-uploading.md)

document.e2e.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN sed -i 's/\r//g' /opt/wait-for-it.sh
1616
RUN sed -i 's/\r//g' /opt/startup.document.ci.sh
1717

1818
WORKDIR /usr/src/app
19-
RUN if [ ! -f .env ]; then cp env-example-document .env; fi
19+
RUN echo "" > .env
2020
RUN npm run build
2121

2222
CMD ["/opt/startup.document.ci.sh"]

relational.e2e.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN sed -i 's/\r//g' /opt/wait-for-it.sh
1616
RUN sed -i 's/\r//g' /opt/startup.relational.ci.sh
1717

1818
WORKDIR /usr/src/app
19-
RUN if [ ! -f .env ]; then cp env-example-relational .env; fi
19+
RUN echo "" > .env
2020
RUN npm run build
2121

2222
CMD ["/opt/startup.relational.ci.sh"]

0 commit comments

Comments
 (0)