]> sourceware.org Git - lvm2.git/commitdiff
tests/dbus: Re-enable nesting and pvcreate via symlink
authorTony Asleson <tasleson@redhat.com>
Tue, 18 Dec 2018 18:43:57 +0000 (12:43 -0600)
committerTony Asleson <tasleson@redhat.com>
Thu, 20 Dec 2018 16:27:30 +0000 (10:27 -0600)
If we are running the test where the device is /dev/* we will will
run the unit tests 'test_nesting' and 'test_pv_symlinks'.  Otherwise
we will skip them.

test/dbus/lvmdbustest.py

index d633aa38a44514380e21dfae359c630745264bf5..9bc1683347ed491608d0eb0acc3b699624dc474c 100755 (executable)
@@ -1873,14 +1873,13 @@ class TestDbusService(unittest.TestCase):
                # when run from lvm2 testsuite. See dbustest.sh.
                pv_object_path = self.objs[PV_INT][0].object_path
 
-               if not pv_object_path.startswith("/dev"):
-                       std_err_print('Skipping test not running in /dev')
-                       return
+               if not self.objs[PV_INT][0].Pv.Name.startswith("/dev"):
+                       raise unittest.SkipTest('test not running in /dev')
 
                for i in range(0, 5):
                        pv_object_path = self._create_nested(pv_object_path)
 
-       def DISABLED_test_pv_symlinks(self):
+       def test_pv_symlinks(self):
                # Lets take one of our test PVs, pvremove it, find a symlink to it
                # and re-create using the symlink to ensure we return an object
                # path to it.  Additionally, we will take the symlink and do a lookup
@@ -1891,6 +1890,9 @@ class TestDbusService(unittest.TestCase):
                pv = self.objs[PV_INT][0]
                pv_device_path = pv.Pv.Name
 
+               if not pv_device_path.startswith("/dev"):
+                       raise unittest.SkipTest('test not running in /dev')
+
                self._pv_remove(pv)
 
                # Make sure we no longer find the pv
This page took 0.033909 seconds and 5 git commands to generate.