1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-17 06:04:23 +03:00

lvmdbustest.py: Make sure to test for hidden lookups

Test both vgname/[hidden] and vgname/hidden forms
This commit is contained in:
Tony Asleson 2016-09-26 22:03:12 -05:00
parent 063265eacd
commit d906fd5201

View File

@ -337,8 +337,16 @@ class TestDbusService(unittest.TestCase):
if len(h_lv.HiddenLvs) > 0:
self._verify_hidden_lookups(h_lv, vgname)
# print("Hidden check %s %s" % (h, h_lv.Name))
full_name = "%s/%s" % (vgname, h_lv.Name)
# print("Hidden check %s" % (full_name))
lookup_path = mgr.LookUpByLvmId(full_name)
self.assertTrue(lookup_path != '/')
self.assertTrue(lookup_path == h_lv.object_path)
# Lets's strip off the '[ ]' and make sure we can find
full_name = "%s/%s" % (vgname, h_lv.Name[1:-1])
# print("Hidden check %s" % (full_name))
lookup_path = mgr.LookUpByLvmId(full_name)
self.assertTrue(lookup_path != '/')
self.assertTrue(lookup_path == h_lv.object_path)