forked from tox-dev/tox-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
90 lines (80 loc) · 2.39 KB
/
tox.ini
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
89
90
[tox]
envlist = integration
[testenv:docs]
deps =
sphinx
sphinx_rtd_theme
vcversioner
commands = sphinx-build -W -b html docs/source docs/build/html
commands_pre =
commands_post =
[testenv:integration]
# tests use these containers in various ways -- the full documentation
# is in the test cases themselves. but briefly, two running instances
# of the tcp-udp-test image are used for checking port mapping & linking
# behavior; and two running instances of the healthcheck container are
# used for testing health checking behavior
docker =
networking-one
networking-two
healthcheck-builtin
healthcheck-custom
deps =
pytest
setenv =
VOLUME_DIR={toxworkdir}
commands =
py.test [] {toxinidir}/tox_docker
python -c 'import os; os.remove(os.environ["VOLUME_DIR"] + "/healthy")'
[testenv:mypy-tox3]
skip_install = true
deps =
mypy==0.910
commands =
mypy --exclude tox4 {toxinidir}/tox_docker
[testenv:mypy-tox4]
skip_install = true
deps =
mypy==0.910
commands =
mypy --exclude tox3 {toxinidir}/tox_docker
[docker:networking-one]
image = ksdn117/tcp-udp-test
ports =
0:1234/tcp
0:5678/udp
[docker:networking-two]
# along with networking-one, proves we can run multiple copies of the same image
image = ksdn117/tcp-udp-test
ports = 2345:1234/tcp
links = networking-one:linked_host
[docker:healthcheck-builtin]
# specify image as full registry URL to prove we can pull that way
image = docker.io/toxdocker/healthcheck:latest
# the default health check start period seems to be 30s, make tests faster
healthcheck_interval = 1
healthcheck_timeout = 1
healthcheck_start_period = 1
[docker:healthcheck-custom]
image = docker.io/toxdocker/healthcheck:latest
healthcheck_cmd = touch /healthcheck/web/healthy
healthcheck_interval = 1
healthcheck_timeout = 1
healthcheck_start_period = 1
volumes =
bind:rw:{toxworkdir}:/healthcheck/web
# do NOT add this env to the envlist; it is supposed to fail,
# and the CI scripts run it directly with this expectation
[testenv:healthcheck-failing]
skip_install = true
commands = python -c ""
docker = healthcheck-failing
[docker:healthcheck-failing]
# we don't need redis in particular, just anything with /bin/false
# (we use this since the CI test runs will have already pulled it)
image = toxdocker/healthcheck
healthcheck_cmd = /bin/false
healthcheck_interval = 1
healthcheck_timeout = 1
healthcheck_retries = 3
healthcheck_start_period = 0