summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-11-12 17:08:02 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-11-12 17:20:05 +0100
commit397dec74114dcdc72728cbe3fe8fa6b982b44f1b (patch)
treecfef2224ebedc1425ce0b153e405bd07fa8db16a
parentc71bbac357f0ac722e1bcb2edfa925b68cca23c9 (diff)
downloadpython-systemd-397dec74114dcdc72728cbe3fe8fa6b982b44f1b.tar.gz
test: make sure $NOTIFY_SOCKET is unset in test
When running the tests in Fedora's mock, the test would fail because NOTIFY_SOCKET is set to /run/systemd/nspawn/notify, and we get a permission error.
-rw-r--r--systemd/test/test_daemon.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/systemd/test/test_daemon.py b/systemd/test/test_daemon.py
index ea680a1..ac782f9 100644
--- a/systemd/test/test_daemon.py
+++ b/systemd/test/test_daemon.py
@@ -297,6 +297,8 @@ def test_listen_fds_with_names_multiple():
assert listen_fds_with_names() == {}
def test_notify_no_socket():
+ os.environ.pop('NOTIFY_SOCKET', None)
+
assert notify('READY=1') is False
with skip_enosys():
assert notify('FDSTORE=1', fds=[]) is False