forked from linksmart/service-catalog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.test.yml
51 lines (44 loc) · 1.09 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
48
49
50
51
# Run either unit-test or integration-test. See below.
version: '2.3'
services:
sc:
build:
context: .
args:
version: ${VERSION}
buildnum: ${BUILDNUM}
image: linksmart/sc
unit-test:
build:
context: .
target: builder
depends_on:
- sc
environment:
- SC_ENDPOINT=http://sc:8082
command: go test -mod=vendor -v ./catalog
# RUN UNIT TESTS
# docker-compose -f docker-compose.test.yml up --abort-on-container-exit --build unit-test
broker:
image: eclipse-mosquitto
sc2:
build:
context: .
depends_on:
- broker
environment:
- SC_MQTT_CLIENT_BROKERURI=tcp://broker:1883
- SC_MQTT_CLIENT_REGTOPICS=LS/v2/+/+/service
integration-test:
build:
context: .
target: builder
depends_on:
- broker
- sc2
environment:
- SC_ENDPOINT=http://sc2:8082
- BROKERS=tcp://broker:1883
command: go test -mod=vendor -v ./integration-test
# RUN INTEGRATION TESTS
# docker-compose -f docker-compose.test.yml up --abort-on-container-exit --build integration-test