Blame SOURCES/0007-tests-add-test_clone_entry_-add-del-_opts_and_re_-ad.patch

55fd57
 tests/command_tests.py | 36 ++++++++++++++++++++++++++++++++++++
55fd57
 1 file changed, 36 insertions(+)
55fd57
55fd57
diff --git a/tests/command_tests.py b/tests/command_tests.py
55fd57
index 6d0c79b..fee6a33 100644
55fd57
--- a/tests/command_tests.py
55fd57
+++ b/tests/command_tests.py
55fd57
@@ -519,6 +519,42 @@ class CommandTests(unittest.TestCase):
55fd57
         be.delete_entry()
55fd57
         self.assertFalse(exists(be._entry_path))
55fd57
 
55fd57
+    def test_clone_entry_del_opts_and_re_add(self):
55fd57
+        # Fedora 24 (Workstation Edition)
55fd57
+
55fd57
+        # Delete rhgb quiet
55fd57
+        osp = get_os_profile_by_id(test_os_id)
55fd57
+        be = create_entry("delopts", "2.6.0", "ffffffff", test_lv,
55fd57
+                          lvm_root_lv=test_root_lv, profile=osp,
55fd57
+                          del_opts="rhgb quiet")
55fd57
+
55fd57
+        # Assert it's gone
55fd57
+        self.assertFalse("rhgb quiet" in be.options)
55fd57
+
55fd57
+        be2 = clone_entry(Selection(boot_id=be.boot_id), title="addoptsclone",
55fd57
+                          add_opts="rhgb quiet")
55fd57
+
55fd57
+        # Assert it's back
55fd57
+        self.assertTrue("rhgb quiet" in be2.options)
55fd57
+
55fd57
+    def test_clone_entry_add_opts_and_re_del(self):
55fd57
+        # Fedora 24 (Workstation Edition)
55fd57
+
55fd57
+        # Add debug
55fd57
+        osp = get_os_profile_by_id(test_os_id)
55fd57
+        be = create_entry("addopts", "2.6.0", "ffffffff", test_lv,
55fd57
+                          lvm_root_lv=test_root_lv, profile=osp,
55fd57
+                          add_opts="debug")
55fd57
+
55fd57
+        # Assert it's there
55fd57
+        self.assertTrue("debug" in be.options)
55fd57
+
55fd57
+        be2 = clone_entry(Selection(boot_id=be.boot_id), title="deloptsclone",
55fd57
+                          del_opts="debug")
55fd57
+
55fd57
+        # Assert it's gone
55fd57
+        self.assertFalse("debug" in be2.options)
55fd57
+
55fd57
     @unittest.skipIf(not have_root_lv(), "requires root LV")
55fd57
     def test_clone_delete_entry(self):
55fd57
         # Fedora 24 (Workstation Edition)