Merge lp:~nskaggs/ubiquity/add-boot-to-installer-ap-test into lp:ubiquity

Proposed by Nicholas Skaggs on 2016-03-14
Status: Merged
Approved by: Mathieu Trudel-Lapierre on 2016-03-16
Approved revision: 6393
Merged at revision: 6392
Proposed branch: lp:~nskaggs/ubiquity/add-boot-to-installer-ap-test
Merge into: lp:ubiquity
Diff against target: 37 lines (+33/-0)
1 file modified
autopilot/ubiquity_autopilot_tests/tests/test_boot_to_installer.py (+33/-0)
To merge this branch: bzr merge lp:~nskaggs/ubiquity/add-boot-to-installer-ap-test
Reviewer Review Type Date Requested Status
Max Brustkern (community) 2016-03-14 Approve on 2016-03-14
Ubuntu Installer Team 2016-03-14 Pending
Review via email: mp+288959@code.launchpad.net

Commit Message

Add a 'desktop boot' test to autopilot test suite.

Description of the Change

Add a 'desktop boot' test to autopilot test suite. This test explicitly verifies we can boot properly to a live session.

This runs properly for me, and I've asked Max to help vet it as well. The goal is to add a simple check to confirm we can boot to the desktop, and get the installer loaded. Since the other tests can fail more frequently, it's not clear if there is an issue with the image, the iso, or the test. This test should be much more robust, while still providing a very useful data point.

To post a comment you must log in.
6392. By Nicholas Skaggs on 2016-03-14

fix copyright

6393. By Nicholas Skaggs on 2016-03-14

flake8

Max Brustkern (nuclearbob) wrote :

Do you need to import sleep from time? Also, since that got through, I'm wondering if you've run flake8 or similar? I don't know if that's mandatory for this project, but I try to do it often anyway.

review: Needs Information
Max Brustkern (nuclearbob) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'autopilot/ubiquity_autopilot_tests/tests/test_boot_to_installer.py'
2--- autopilot/ubiquity_autopilot_tests/tests/test_boot_to_installer.py 1970-01-01 00:00:00 +0000
3+++ autopilot/ubiquity_autopilot_tests/tests/test_boot_to_installer.py 2016-03-14 17:14:52 +0000
4@@ -0,0 +1,33 @@
5+# Testing Desktop Live Session Boot
6+# Authors: Dan Chapman <daniel@chapman-mail.com>,
7+# Nicholas Skaggs <nicholas.skaggs@canonical.com>
8+# Copyright (C) 2013-2016
9+#
10+# This program is free software: you can redistribute it and/or modify
11+# it under the terms of the GNU General Public License version 3 as
12+# published by the Free Software Foundation.
13+#
14+# This program is distributed in the hope that it will be useful,
15+# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+# GNU General Public License for more details.
18+#
19+# You should have received a copy of the GNU General Public License
20+# along with this program. If not, see <http://www.gnu.org/licenses/>.
21+
22+from ubiquity_autopilot_tests.tests import UbiquityAutopilotTestCase
23+from testtools.matchers import Equals
24+from autopilot.matchers import Eventually
25+from ubiquity_autopilot_tests.emulators import gtktoplevel
26+
27+
28+class BootToInstaller(UbiquityAutopilotTestCase):
29+ """
30+ Tests to ensure the image boots to the installer properly
31+ """
32+
33+ def test_boot_to_installer(self, ):
34+ # first check we have an emulator instance
35+ self.assertIsInstance(self.main_window, gtktoplevel.GtkWindow)
36+ self.assertThat(self.main_window.visible, Eventually(Equals(True)))
37+ self.welcome_page_tests(lang='English')

Subscribers

People subscribed via source and target branches

to status/vote changes: