forked from datajoint-company/ibl-navigator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-test.yml
88 lines (88 loc) · 2.17 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Use: Continuous integration testing.
# docker-compose -f docker-compose-test.yml up --build --exit-code-from load
version: '2.4'
x-net: &net
networks:
- main
services:
iblapi:
extends:
file: ./docker-compose-dev.yml
service: iblapi
environment:
- DJ_HOST=${TEST_DJ_HOST}
- DJ_USER=${TEST_DJ_USER}
- DJ_PASS=${TEST_DJ_PASS}
- WORKER_COUNT=1
entrypoint: ["/bin/sh"]
command: >
-c
"
## init test db
# pip install git+https://github.com/int-brain-lab/IBL-pipeline.git
# MODE=update python /src/iblapi/tests/schema.py;
## serve prod
/src/iblapi/run-ibl-api.prod.sh &
## perform tests
## pass healthcheck
touch /tmp/pass_check;
tail -f /dev/null;
"
healthcheck:
test: wget --quiet --tries=1 --spider http://localhost:5000/v0/lab > /dev/null 2>&1 && [ -f "/tmp/pass_check" ] || exit 1
timeout: 3s
retries: 20
<<: *net
ibl-navigator:
extends:
file: ./docker-compose-dev.yml
service: ibl-navigator
<<: *net
ibl-node-server:
extends:
file: ./docker-compose-dev.yml
service: ibl-node-server
<<: *net
fakeservices.datajoint.io:
extends:
file: ./docker-compose-dev.yml
service: nginx
<<: *net
load:
image: loadimpact/k6:0.26.2
environment:
- SUBDOMAIN=fakeservices
- DOMAIN=datajoint.io
- DEMO_USERNAME=ibluser
- DEMO_PASSWORD=${DEMO_PASSWORD}
## w/ WORKER_COUNT=4
- VUS=19 # t2 100.0%
# - VUS=14 # t3 73.7%
# - VUS=9 # t3a 47.4%
## w/ WORKER_COUNT=1
# - VUS=13 # t2 100.0%
# - VUS=13 # t3 100.0%
# - VUS=7 # t3a 53.8%
- FAILURE_RATE="0.15"
user: root
working_dir: /tmp
entrypoint: sh
command: -c "./k6_run.sh"
volumes:
- ./load:/tmp
depends_on:
iblapi:
condition: service_healthy
ibl-navigator:
condition: service_healthy
ibl-node-server:
condition: service_healthy
fakeservices.datajoint.io:
condition: service_healthy
<<: *net
networks:
main:
ipam:
driver: default
config:
- subnet: 10.28.0.0/16