|
1 | 1 | [docker_cli/wait]
|
2 |
| -subsubtests = no_wait,wait_first,wait_last,wait_missing |
3 |
| -docker_timeout = 60 |
4 |
| -#: modifies the running container options |
5 |
| -run_options_csv = --detach,--interactive |
6 |
| -#: list of used containers (use _$name to override config variables) |
7 |
| -containers = cont0 cont1 cont2 |
8 |
| -#: executed command on container called ``_cont0`` |
9 |
| -exec_cmd_cont0 = sleep 10; exit 1 |
10 |
| -#: executed command on container called ``_cont1`` |
11 |
| -exec_cmd_cont1 = exit 2 |
12 |
| -#: executed command on container called ``_cont2`` |
13 |
| -exec_cmd_cont2 = exit 3 |
14 |
| -#: Identify containers by True=name,False=id,RANDOM=random |
15 |
| -use_names = RANDOM |
16 |
| -#: random_seed - can be set to override the initial random seed used in test |
17 |
| -random_seed = |
18 |
| -#: which containers we should wait for. Either use index of the |
19 |
| -#: the container or '_' + string. The leading char will be removed! |
20 |
| -wait_for = |
21 |
| -#: Error regular expression which should match on missing container name ``%%s`` |
22 |
| -missing_stderr = Error response from daemon: wait: no such \w+: %%s |
23 |
| -#: When 'yes', invert regex failure meaning for test result |
24 |
| -invert_missing = no |
25 |
| - |
26 |
| -[docker_cli/wait/no_wait] |
27 |
| -wait_for = 1 2 |
28 |
| - |
29 |
| -[docker_cli/wait/wait_first] |
30 |
| -wait_for = 0 1 2 |
31 |
| - |
32 |
| -[docker_cli/wait/wait_last] |
33 |
| -wait_for = 2 1 0 |
34 |
| - |
35 |
| -[docker_cli/wait/wait_missing] |
36 |
| -invert_missing = yes |
37 |
| -wait_for = _i_hope_this_container_does_not_exist 0 1 2 _this_one_is_also_missing |
| 2 | +subsubtests = Simple, Multi, Sig |
| 3 | + |
| 4 | +#: CSV list of strings describing how containers are setup, "CREATE", "RUN" |
| 5 | +#: or "NONE". Each value represents a separate container and all ``target_*`` |
| 6 | +#: lists must contain exactly the same number of items. |
| 7 | +target_setups = RUN |
| 8 | + |
| 9 | +#: CSV list of operations to perform on each container during the test |
| 10 | +#: wait command: |
| 11 | +#: {n} |
| 12 | +#: {t} * ``STOP`` - Use ``docker stop`` on the target container |
| 13 | +#: {t} * ``KILL`` - Use ``docker kill`` on the target container |
| 14 | +#: {t} * ``<n>`` - Send signal number ``<n>`` to target container |
| 15 | +#: {t} * ``REMV`` - Use ``docker rm --force`` on the target container |
| 16 | +#: {t} * ``NONE`` - Do nothing |
| 17 | +#: {n} |
| 18 | +target_waits = NONE |
| 19 | + |
| 20 | +#: CSV list of sleep times for each target, must have same number of items |
| 21 | +#: as ``target_setups`` and ``target_waits``. Do not rely on timing for |
| 22 | +#: precise synchronization! |
| 23 | +target_sleeps = 0.5 |
| 24 | + |
| 25 | +#: Expected exit code from wait command |
| 26 | +exit = 0 |
| 27 | + |
| 28 | +#: (optional) Regular expression that much match wait command stdout |
| 29 | +stdout = ^0\n$ |
| 30 | + |
| 31 | +#: (optional) Regular expression that much match wait command stderr |
| 32 | +stderr = |
| 33 | + |
| 34 | +#: Timeout for the target docker command in seconds |
| 35 | +target_timeout = 10 |
| 36 | + |
| 37 | +#: Timeout for the wait command itself |
| 38 | +docker_timeout = 20 |
| 39 | + |
| 40 | +#: Quoted command line to pass to each target container |
| 41 | +target_cmd = bash,-c,'trap "echo \"Received Signal 30\"" 30; sleep @SLEEP@s' |
| 42 | + |
| 43 | +#: CSV run command line options minus --name & image for each target container |
| 44 | +target_run = --detach |
| 45 | + |
| 46 | +#: Run target containers with more verbosity under all conditions |
| 47 | +target_verbose = no |
| 48 | + |
| 49 | +#: Run wait command with more verbosity |
| 50 | +wait_verbose = no |
| 51 | + |
| 52 | +[docker_cli/wait/Multi] |
| 53 | +docker_timeout = 20 |
| 54 | +target_setups = RUN, RUN, RUN |
| 55 | +target_waits = NONE, KILL, NONE |
| 56 | +target_sleeps = 1, 5, 3 |
| 57 | +stdout = ^0\n137\n0$ |
| 58 | + |
| 59 | +[docker_cli/wait/Sig] |
| 60 | +docker_timeout = 20 |
| 61 | +target_setups = RUN |
| 62 | +target_waits = 30 |
| 63 | +target_sleeps = 0.5 |
0 commit comments