- 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