mirror of
https://github.com/troglobit/finit.git
synced 2026-10-30 12:50:34 +00:00
test: new test
New test adds /bin/fail.sh to verify that a failing pre:script (that also takes too long to run) is detected: exit code and timeout. Ensure existing test pass full path to /sbin/fail.sh script. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
5 files changed
+67
-25
No files matched your search
@@ -84,6 +84,14 @@ assert_status()
|
||||
assert "Service $service $status" "$(texec initctl -p status "$service" | awk '/Status/{print $3}')" = "$status"
|
||||
}
|
||||
|
||||
# Used by, e.g., pre-fail.sh
|
||||
assert_status_full()
|
||||
{
|
||||
service=$1; shift
|
||||
status="$*"
|
||||
assert "Service $service status is: $status" "$(texec initctl -p status "$service" | awk '/Status/{sub("^ *Status : ", ""); print}')" = "$status"
|
||||
}
|
||||
|
||||
assert_cond()
|
||||
{
|
||||
cond=$1
|
||||
|
||||
Reference in new issue
Block a user