[gnome-boxes] tests: Add "Express install Fedora 20" test



commit 5c07fd5635438b8c6c1d4ae1567d34ea5f406bdc
Author: Vladimir Benes <benesv email cz>
Date:   Wed Jun 10 14:43:59 2015 +0200

    tests: Add "Express install Fedora 20" test
    
    Add test which downloads Fedora 20 4.3 GB iso and starts express
    installation with it. Test user with password is added and checked
    via ssh if present after installation.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=748006

 Makefile.am                   |    1 +
 tests/README                  |    3 +++
 tests/environment.py          |    7 +++++++
 tests/express-install.feature |   23 +++++++++++++++++++++++
 4 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 59d2470..e2d02dd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -83,6 +83,7 @@ INSTALLED_TESTS=                              \
        spice.feature                           \
        system-broker.feature                   \
        vnc.feature                             \
+       express-install.feature                 \
        $(NULL)
 INSTALLED_TESTS_TYPE=session-exclusive
 -include $(top_srcdir)/git.mk
diff --git a/tests/README b/tests/README
index 2ee83fc..e2be381 100644
--- a/tests/README
+++ b/tests/README
@@ -55,6 +55,8 @@ Structure
   * vnc.feature
     * connect to vnc box
     * restart persistence
+  * express-install.feature
+    * express installation of Fedora 20
 * Environment file
   * everything for setting/cleaning up the environment
 * Steps
@@ -68,6 +70,7 @@ Requirements
   * behave (python-behave in Fedora)
   * dogtail
   * xdotool
+  * pexpect
 
 * for vnc tests execution
   * tigervnc-server (or similar)
diff --git a/tests/environment.py b/tests/environment.py
index 1f813e8..463e624 100644
--- a/tests/environment.py
+++ b/tests/environment.py
@@ -200,6 +200,13 @@ def after_step(context, step):
         print "Error in after_step: %s" % str(e)
 
 def after_tag(context, tag):
+    if 'express_install' in tag:
+        if 'express_install_fedora_20' in tag:
+            call('rm -rf ~/Downloads/Fedora-20*', shell=True)
+
+        # need to remove cache file as otherwise prefilled values may be in use
+        call('rm -rf ~/.cache/gnome-boxes/unattended', shell=True)
+
     if 'vnc' in tag:
         os.system('vncserver -kill :1 > /dev/null 2>&1')
         os.system('rm -rf /tmp/vnc_text.txt')
diff --git a/tests/express-install.feature b/tests/express-install.feature
new file mode 100644
index 0000000..5d2d131
--- /dev/null
+++ b/tests/express-install.feature
@@ -0,0 +1,23 @@
+Feature: Express install
+
+  Background:
+    * Make sure that gnome-boxes is running
+    * Wait until overview is loaded
+
+  @express_install_fedora_20
+  Scenario: Express install Fedora 20
+    * Create new box from url 
"http://mirrors.nic.cz/pub/fedora/linux/releases/20/Fedora/x86_64/iso/Fedora-20-x86_64-DVD.iso";
+    * Hit "Tab"
+    * Hit "Tab"
+    * Type "test"
+    * Press "Add Password"
+    * Type "secretpasswordnumber1"
+    * Press "Continue"
+    * Press "Create"
+    Then Installation of "Fedora 20" is finished in "30" minutes
+    * Save IP for machine "Fedora 20"
+    Then Box "Fedora 20" "does" exist
+    Then Go into "Fedora 20" box
+    Then Press "back" in "Fedora 20" vm
+    Then Ping "Fedora 20"
+    Then Verify "test" user with "secretpasswordnumber1" password in "Fedora 20"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]