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