varlink: don't try to talk to oomd from unit tests
Talking to external daemons we ourselves maintain is a job for the integration tests, not the unit tests. This communication is likely to fail hence don#t even bother. This makes our tests a bit cleaner.
This commit is contained in:
@@ -562,6 +562,9 @@ static int manager_varlink_init_user(Manager *m) {
|
||||
if (m->managed_oom_varlink)
|
||||
return 1;
|
||||
|
||||
if (MANAGER_IS_TEST_RUN(m))
|
||||
return 0;
|
||||
|
||||
r = varlink_connect_address(&link, VARLINK_ADDR_PATH_MANAGED_OOM_USER);
|
||||
if (r == -ENOENT || ERRNO_IS_DISCONNECT(r)) {
|
||||
log_debug("systemd-oomd varlink unix socket not found, skipping user manager varlink setup");
|
||||
|
||||
Reference in New Issue
Block a user