mirror of
https://github.com/troglobit/finit.git
synced 2026-10-28 12:30:44 +00:00
test: Slightly improve names of test directories
Signed-off-by: Magnus Malm <magnusmalm@gmail.com>
This commit is contained in:
1 parent
e77f3f4d74
commit
76b2a846a2
11 files changed
+17
-17
No files matched your search
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
TEST_DIR=$(dirname "$0")/..
|
||||
TESTENV_ROOT="$TEST_DIR"/test-root
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
. "$TEST_DIR/lib.sh"
|
||||
|
||||
test_teardown() {
|
||||
say "Test done $(date)"
|
||||
say "Running test teardown."
|
||||
|
||||
remove_thing "$TESTENV_ROOT/$FINIT_CONF"
|
||||
remove_thing "$TESTENV_ROOT"/test_assets/service.sh
|
||||
}
|
||||
|
||||
say "Test start $(date)"
|
||||
|
||||
cp "$TEST_DIR"/common/service.sh "$TEST_DIR"/test-root/test_assets/
|
||||
|
||||
say "Add a dynamic service in $FINIT_CONF"
|
||||
texec sh -c "echo 'service [2345] kill:20 log /test_assets/service.sh' > $FINIT_CONF"
|
||||
|
||||
say 'Reload Finit'
|
||||
texec sh -c "initctl reload"
|
||||
|
||||
retry 'assert_num_children 1 service.sh'
|
||||
|
||||
say 'Remove the dynamic service from /etc/finit.conf'
|
||||
texec sh -c "echo > $FINIT_CONF"
|
||||
|
||||
say 'Reload Finit'
|
||||
texec sh -c "initctl reload"
|
||||
|
||||
retry 'assert_num_children 0 service.sh'
|
||||
Reference in new issue
Block a user