[lvm-devel] master - lvmdbustest.py: Make sure to test for hidden lookups

tasleson tasleson at fedoraproject.org
Tue Sep 27 18:33:52 UTC 2016


Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d906fd520129d639c7cad27c24f88836d133f9ad
Commit:        d906fd520129d639c7cad27c24f88836d133f9ad
Parent:        063265eacda95dbc1567e647734a000c8d68c8b7
Author:        Tony Asleson <tasleson at redhat.com>
AuthorDate:    Mon Sep 26 22:03:12 2016 -0500
Committer:     Tony Asleson <tasleson at redhat.com>
CommitterDate: Tue Sep 27 13:28:54 2016 -0500

lvmdbustest.py: Make sure to test for hidden lookups

Test both vgname/[hidden] and vgname/hidden forms
---
 test/dbus/lvmdbustest.py |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py
index 7a2c44f..819d096 100755
--- a/test/dbus/lvmdbustest.py
+++ b/test/dbus/lvmdbustest.py
@@ -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)




More information about the lvm-devel mailing list