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:
Danila Kiver 2019-07-06 17:41:29 +03:00
parent c490754ff7
commit 1f435bf92c
1 changed files with 5 additions and 1 deletions

View File

@ -12,7 +12,11 @@ UNIT_FILE="$UNIT_DIR/$SERVICE_NAME.service"
function setup() {
basic_setup
mkdir -p "$UNIT_DIR"
if [ ! -d "$UNIT_DIR" ]; then
mkdir -p "$UNIT_DIR"
systemctl --user daemon-reload
fi
}
function teardown() {