test: setup test data dir before fake runtime dir
That way, if the test directory does not exist we don't leave behind temporary files (as in that case or on test failure the cleanup actions don't run).
This commit is contained in:
@@ -37,10 +37,9 @@ int main(int argc, char *argv[]) {
|
||||
Job *j;
|
||||
int r;
|
||||
|
||||
assert_se(runtime_dir = setup_fake_runtime_dir());
|
||||
|
||||
/* prepare the test */
|
||||
assert_se(set_unit_path(TEST_DATA_DIR("")) >= 0);
|
||||
assert_se(runtime_dir = setup_fake_runtime_dir());
|
||||
r = manager_new(UNIT_FILE_USER, true, &m);
|
||||
if (MANAGER_SKIP_TEST(r)) {
|
||||
log_notice_errno(r, "Skipping test: manager_new: %m");
|
||||
|
||||
Reference in New Issue
Block a user