diff options
author | Tony Asleson <tasleson@redhat.com> | 2022-08-23 10:31:31 -0500 |
---|---|---|
committer | Tony Asleson <tasleson@redhat.com> | 2022-09-16 10:49:37 -0500 |
commit | f252e05aaeb1a34598cc9d93e3c65ce2e311621b (patch) | |
tree | 8d04e20f440458b6bee79588aa313a4b4b5b8ef0 /test/dbus | |
parent | d16c0a3e2bc1d36fc11ed763ac32184f09c6c67c (diff) | |
download | lvm2-f252e05aaeb1a34598cc9d93e3c65ce2e311621b.tar.gz |
lvmdbustest: Add test for ensuring only 1 instance of daemon
Diffstat (limited to 'test/dbus')
-rwxr-xr-x | test/dbus/lvmdbustest.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py index 7a03c46a2..72a75edea 100755 --- a/test/dbus/lvmdbustest.py +++ b/test/dbus/lvmdbustest.py @@ -2338,6 +2338,14 @@ class TestDbusService(unittest.TestCase): "Failed to exit after sending signal %f seconds after " "queuing up work for signal %d" % (sleep_amt, signal.SIGINT)) + def test_singleton_daemon(self): + # Ensure we can only have 1 daemon running at a time, daemon should exit with 114 if already running + di = DaemonInfo.get() + self.assertTrue(di is not None) + if di: + ec = di.start(True) + self.assertEqual(ec, 114) + class AggregateResults(object): |