]> sourceware.org Git - lvm2.git/commitdiff
lvmdbustest: Add test for external event
authorTony Asleson <tasleson@redhat.com>
Wed, 17 Aug 2022 17:12:17 +0000 (12:12 -0500)
committerTony Asleson <tasleson@redhat.com>
Fri, 16 Sep 2022 15:49:37 +0000 (10:49 -0500)
Ensure that when we trigger an external event that we don't incorrectly
handle multiple --config options.

test/dbus/lvmdbustest.py

index c03e96c0817d68064c36914ef9810a481d7db56f..d67298fe9e455711c8796267423095918f148e0c 100755 (executable)
@@ -2095,6 +2095,16 @@ class TestDbusService(unittest.TestCase):
        def test_log_file_option(self):
                self._log_file_option()
 
+       def test_external_event(self):
+               # Call into the service to register an external event, so that we can test sending the path
+               # where we don't send notifications on the command line in addition to the logging
+               lvm_manager = dbus.Interface(bus.get_object(
+                       BUS_NAME, "/com/redhat/lvmdbus1/Manager", introspect=False),
+                       "com.redhat.lvmdbus1.Manager")
+               rc = lvm_manager.ExternalEvent("unit_test")
+               self.assertTrue(rc == 0)
+               self._log_file_option()
+
 class AggregateResults(object):
 
        def __init__(self):
This page took 0.038132 seconds and 5 git commands to generate.