From ed92e03f395e0fc100ee4df6aef19249befdad67 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 6 Mar 2017 15:46:39 -0500 Subject: [PATCH] tests: make test-clone VMs offline by default Simplifies test cases --- .../cli-test-xml/compare/virt-clone-clone-auto1.xml | 6 ------ .../cli-test-xml/compare/virt-clone-clone-auto2.xml | 1 - tests/clitest.py | 4 ++-- tests/testdriver.xml | 12 ++++++++---- tests/uitests/cli.py | 6 +++--- 5 files changed, 13 insertions(+), 16 deletions(-) diff --git a/tests/cli-test-xml/compare/virt-clone-clone-auto1.xml b/tests/cli-test-xml/compare/virt-clone-clone-auto1.xml index a370fe01b..9daa73fcd 100644 --- a/tests/cli-test-xml/compare/virt-clone-clone-auto1.xml +++ b/tests/cli-test-xml/compare/virt-clone-clone-auto1.xml @@ -22,19 +22,16 @@ -
-
-
@@ -42,7 +39,6 @@ - @@ -50,13 +46,11 @@ -
-
diff --git a/tests/cli-test-xml/compare/virt-clone-clone-auto2.xml b/tests/cli-test-xml/compare/virt-clone-clone-auto2.xml index d8abf10b3..890d2b06d 100644 --- a/tests/cli-test-xml/compare/virt-clone-clone-auto2.xml +++ b/tests/cli-test-xml/compare/virt-clone-clone-auto2.xml @@ -22,7 +22,6 @@ -
diff --git a/tests/clitest.py b/tests/clitest.py index f939c3422..4534c2e34 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -943,10 +943,10 @@ c.add_valid("-o test --auto-clone") # Auto flag, no storage c.add_valid("--original-xml %(CLONE_STORAGE_XML)s --auto-clone") # Auto flag w/ managed storage c.add_valid("--original-xml %(CLONE_DISK_XML)s --auto-clone") # Auto flag w/ local storage c.add_valid("-o test-clone --auto-clone --clone-running") # Auto flag, actual VM, skip state check -c.add_valid("-o test-clone-simple -n newvm --preserve-data --file %(EXISTIMG1)s --clone-running") # Preserve data shouldn't complain about existing volume +c.add_valid("-o test-clone-simple -n newvm --preserve-data --file %(EXISTIMG1)s") # Preserve data shouldn't complain about existing volume c.add_valid("-n clonetest --original-xml %(CLONE_DISK_XML)s --file %(EXISTIMG3)s --file %(EXISTIMG4)s --check path_exists=off") # Skip existing file check c.add_invalid("--auto-clone") # Just the auto flag -c.add_invalid("-o test-clone --auto-clone") +c.add_invalid("-o test-many-devices --auto-clone") # VM is running, but --clone-running isn't passed c.add_invalid("-o test-clone-simple -n newvm --file %(EXISTIMG1)s --clone-running") # Should complain about overwriting existing file diff --git a/tests/testdriver.xml b/tests/testdriver.xml index 0c7333e76..5363b6cc4 100644 --- a/tests/testdriver.xml +++ b/tests/testdriver.xml @@ -764,7 +764,8 @@ test-many-devices, like an alternate RNG. - + + 5 test-clone-simple 204800 409600 @@ -799,7 +800,8 @@ test-many-devices, like an alternate RNG. - + + 5 test-clone 204800 409600 @@ -866,7 +868,8 @@ test-many-devices, like an alternate RNG. - + + 5 test-clone-halffull 204800 409600 @@ -901,7 +904,8 @@ test-many-devices, like an alternate RNG. - + + 5 test-clone-full 204800 409600 diff --git a/tests/uitests/cli.py b/tests/uitests/cli.py index 293913d34..78cabff44 100644 --- a/tests/uitests/cli.py +++ b/tests/uitests/cli.py @@ -43,7 +43,7 @@ class VMMCLI(unittest.TestCase): win = uiutils.find_fuzzy(self.app.root, "test-clone-simple on", "frame") self.assertFalse( - uiutils.find_fuzzy(win, "Graphical console not", "label").showing) + uiutils.find_fuzzy(win, "Guest is not running", "label").showing) self.assertTrue( uiutils.find_fuzzy(win, "add-hardware", "button").showing) self.app.quit() @@ -55,7 +55,7 @@ class VMMCLI(unittest.TestCase): win = uiutils.find_fuzzy(self.app.root, "test-clone-simple on", "frame") self.assertFalse( - uiutils.find_fuzzy(win, "Graphical console not", "label").showing) + uiutils.find_fuzzy(win, "Guest is not running", "label").showing) self.assertTrue( uiutils.find_fuzzy(win, "CPU usage", "label").showing) self.app.quit() @@ -66,7 +66,7 @@ class VMMCLI(unittest.TestCase): win = uiutils.find_fuzzy(self.app.root, "test-clone-simple on", "frame") self.assertTrue( - uiutils.find_fuzzy(win, "Graphical console not", "label").showing) + uiutils.find_fuzzy(win, "Guest is not running", "label").showing) self.assertFalse( uiutils.find_fuzzy(win, "add-hardware", "button").showing) self.app.quit()