Reload systemd daemon on creation of units location dir in tests.
Systemd manager drops non-existent directories from the units search path during initialization, thus, creation of UNIT_DIR, if it did not exist before, requres reloading the daemon. Signed-off-by: Danila Kiver <danila.kiver@mail.ru>
This commit is contained in:
parent
c490754ff7
commit
1f435bf92c
|
|
@ -12,7 +12,11 @@ UNIT_FILE="$UNIT_DIR/$SERVICE_NAME.service"
|
||||||
|
|
||||||
function setup() {
|
function setup() {
|
||||||
basic_setup
|
basic_setup
|
||||||
mkdir -p "$UNIT_DIR"
|
|
||||||
|
if [ ! -d "$UNIT_DIR" ]; then
|
||||||
|
mkdir -p "$UNIT_DIR"
|
||||||
|
systemctl --user daemon-reload
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function teardown() {
|
function teardown() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue