blob: acca151a0662cb4ec4f7bc7208c10f77c6aba2ed (
plain)
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
91
92
93
94
95
96
|
- given: there is no "{args:text}" process
impl:
python:
function: daemon_no_such_process
- given: a daemon helper shell script {filename}
impl:
python:
function: _daemon_shell_script
types:
filename: file
- when: I start "{path}{args:text}" as a background process as {name}, on port {port}
impl:
python:
function: daemon_start_on_port
- when: I start "(?P<path>[^ "]+)(?P<args>[^"]*)" as a background process as (?P<name>[^,]+), on port (?P<port>\d+), with environment (?P<env>.*)
regex: true
impl:
python:
function: daemon_start_on_port
- when: I try to start "{path}{args:text}" as {name}, on port {port}
impl:
python:
function: _daemon_start_soonish
cleanup: _daemon_stop_soonish
- when: I try to start "(?P<path>[^ "]+)(?P<args>[^"]*)" as (?P<name>[^,]+), on port (?P<port>\d+), with environment (?P<env>.*)
regex: true
impl:
python:
function: _daemon_start_soonish
cleanup: _daemon_stop_soonish
- when: I start "{path}{args:text}" as a background process as {name}
impl:
python:
function: _daemon_start
- when: I start "(?P<path>[^ "]+)(?P<args>[^"]*)" as a background process as (?P<name>[^,]+), with environment (?P<env>.*)
regex: true
impl:
python:
function: _daemon_start
- when: I stop background process {name}
impl:
python:
function: daemon_stop
- when: daemon {name} has produced output
impl:
python:
function: daemon_has_produced_output
- then: a process "{args:text}" is running
impl:
python:
function: daemon_process_exists
- then: there is no "{args:text}" process
impl:
python:
function: daemon_no_such_process
- then: starting daemon fails with "{message:text}"
impl:
python:
function: daemon_start_fails_with
- then: starting the daemon succeeds
impl:
python:
function: daemon_start_succeeds
- then: daemon {name} stdout is "{text:text}"
impl:
python:
function: daemon_stdout_is
- then: daemon {name} stdout contains "{text:text}"
impl:
python:
function: daemon_stdout_contains
- then: daemon {name} stdout doesn't contain "{text:text}"
impl:
python:
function: daemon_stdout_doesnt_contain
- then: daemon {name} stderr is "{text:text}"
impl:
python:
function: daemon_stderr_is
|