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