[node-patches] Change in ovirt-node[master]: tests: Fix basic_tui_installation testcase

fabiand at fedoraproject.org fabiand at fedoraproject.org
Fri May 10 15:42:33 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: tests: Fix basic_tui_installation testcase
......................................................................

tests: Fix basic_tui_installation testcase

The testcase is now updated to work with the new installer UI.

Change-Id: Ia83c3506033997cb1cf66a06014673a024fea147
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M tests/igor/tcs/uinput/basic_tui_installation.py
1 file changed, 35 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/51/14651/1

diff --git a/tests/igor/tcs/uinput/basic_tui_installation.py b/tests/igor/tcs/uinput/basic_tui_installation.py
index 9583172..2346fcb 100644
--- a/tests/igor/tcs/uinput/basic_tui_installation.py
+++ b/tests/igor/tcs/uinput/basic_tui_installation.py
@@ -11,6 +11,8 @@
 import common.common
 import common.input
 
+from common.input.uinput import KEY_ENTER, KEY_UP, KEY_RIGHT, KEY_TAB
+
 
 logger = logging.getLogger(__name__)
 
@@ -18,43 +20,63 @@
     """We poll to see when the installation has finished, it's done this way
     to avoid a niave sleep for 240 seconds
     """
-    return common.input.wait_for_regex_on_screen("Installation Finished", 240)
+    return common.input.wait_for_regex_on_screen("5/5",
+                                                 240)
 
 story = [
     # P. 1 Welcome
     # Press nothing, wait 0 seconds, expect "Install …"
-    (None,                  0, "Install Hypervisor"),
+    (None,
+     0,
+     "Install Hypervisor"),
 
     # P. 2: Enter keyboard selection
     # Press ENTER, wait 4 seconds, expect "Keyboard …"
-    (["\n"],                10, "Keyboard Layout Selection"),
+    ([KEY_ENTER],
+     10,
+     "Keyboard Layout Selection"),
 
     # P. 2: Select german keyboard layout
     # Press 53 times UP, wait 0 seconds and expect "German"
-    (39 * [common.input.uinput.KEY_UP], 10, "German"),
+    (39 * [KEY_UP],
+     20,
+     "German"),
 
     # P. 3: Enter boot device selection
     # Press ENTER wait 4 seconds and expect "booting …"
-    (["\n"],               10, "booting (oVirt Node|RHEV Hypervisor)"),
+    ([KEY_ENTER],
+     10,
+     "booting (oVirt Node|RHEV Hypervisor)"),
 
     # P. 4: Enter installation device selection
-    (["\n"],               10, "installation of (oVirt Node|RHEV Hypervisor)"),
+    (KEY_ENTER,
+     10,
+     "installation of (oVirt Node|RHEV Hypervisor)"),
 
     # P. 5: Enter sizes dialog
-    (["\t\t\t\n"],         10, "enter the sizes for"),
+    ([KEY_TAB] + 2 * [KEY_RIGHT] + [KEY_ENTER],
+     10,
+     "enter the sizes for"),
 
-    # P. 6: Enter password dialog
-    (["\t\t\t\t\t\t\n"],   10, "Require a password"),
-    # P. 6: Enter password
-    (["ovirt\tovirt\t"],   10, "a weak password"),
+    # P. 6: Enter volume sizes
+    (4 * [KEY_TAB] + 2 * [KEY_RIGHT] + [KEY_ENTER],
+     10,
+     "Require a password"),
+
+    # P. 7: Enter password
+    (["ovirt", KEY_TAB, "ovirt", KEY_TAB],
+     10,
+     None),
 
     # P. 7: Start installation, and give it at most 240 seconds to complete
-    (["\t\t\n"],   wait_for_last_page, "Installation Finished"),
+    (2 * [KEY_RIGHT] + [KEY_ENTER],
+     wait_for_last_page,
+     None),
 ]
 
 reboot_seq = [
     # P. 7: Reboot
-    "\n"
+    [KEY_ENTER]
 ]
 
 if __name__ == "__main__":


--
To view, visit http://gerrit.ovirt.org/14651
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia83c3506033997cb1cf66a06014673a024fea147
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list