mirror of
https://github.com/troglobit/finit.git
synced 2026-10-17 10:49:34 +00:00
test: minor refactor, relocate "Test start ..." message to setup.sh
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
31 files changed
+21
-127
No files matched your search
+5
-11
@@ -1,26 +1,20 @@
|
||||
#!/bin/sh
|
||||
# Regression test for basic /etc/rc.local functionality
|
||||
# shellcheck disable=SC2317
|
||||
# shellcheck disable=2317,2034
|
||||
set -eu
|
||||
|
||||
RCLOCAL="echo 'KILROY WAS HERE' > /tmp/rclocal"
|
||||
TEST_DIR=$(dirname "$0")
|
||||
#DEBUG=1
|
||||
# shellcheck disable=SC2034
|
||||
RCLOCAL="echo 'KILROY WAS HERE' > /tmp/rclocal"
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
. "$TEST_DIR/lib/setup.sh"
|
||||
|
||||
test_setup()
|
||||
{
|
||||
say "Test start $(date)"
|
||||
}
|
||||
|
||||
test_teardown()
|
||||
{
|
||||
say "Test done $(date)"
|
||||
}
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
. "$TEST_DIR/lib/setup.sh"
|
||||
|
||||
sleep 1
|
||||
assert_file_contains /tmp/rclocal "KILROY WAS HERE"
|
||||
|
||||
|
||||
Reference in new issue
Block a user