-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.test.yml
47 lines (41 loc) · 1.03 KB
/
docker-compose.test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
version: '3.2'
networks:
integration-test-example:
services:
it_tests:
build:
context: .
dockerfile: ./Dockerfile.test
volumes:
- $PWD:/go/src/target
depends_on:
- db
networks:
- integration-test-example
db:
image: postgres:12.12
ports:
-"5432:5432"
expose:
- "5432"
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: postgres
restart: on-failure
volumes:
- ./init:/docker-entrypoint-initdb.d/
networks:
- integration-test-example
# ====================
# (0 = pass)
# ***Docker-compose test sandbox (integration test)
# docker-compose -f docker-compose.test.yml down
# to run test `docker-compose -f docker-compose.test.yml up --build --abort-on-container-exit --exit-code-from it_tests`
# to tear down `docker-compose -f docker-compose.test.yml down`
# ***sonar-project
# sonar.projectKey=assessment
# sonar.sources=.
# sonar.exclusions=**/*_test.go
# sonar.tests=.
# sonar.test.inclusions=**/*_test.go