Bug 1314550 - Better failure message for update tests in case of watershed releases. draft
authorHenrik Skupin <mail@hskupin.info>
Wed, 02 Nov 2016 11:37:40 +0100
changeset 432568 2d1adfb6ffcc25e85fb109dc64da6c1ad62430c1
parent 431996 2c773b97167252cedcba0be0c7af9d4cab192ef5
child 535700 4e9edf333b8a2ac0ff78105a5e65231f9b961707
push id34366
push userbmo:hskupin@gmail.com
push dateWed, 02 Nov 2016 10:38:20 +0000
bugs1314550
milestone52.0a1
Bug 1314550 - Better failure message for update tests in case of watershed releases. MozReview-Commit-ID: Ja8ebnKznc3
testing/firefox-ui/harness/firefox_ui_harness/testcases.py
--- a/testing/firefox-ui/harness/firefox_ui_harness/testcases.py
+++ b/testing/firefox-ui/harness/firefox_ui_harness/testcases.py
@@ -163,17 +163,21 @@ class UpdateTestCase(FirefoxTestCase):
 
     def check_update_applied(self):
         """Check that the update has been applied correctly"""
         update = self.updates[self.current_update_index]
         update['build_post'] = self.software_update.build_info
 
         about_window = self.browser.open_about_window()
         try:
+            # Bug 604364 - We do not support watershed releases yet.
             update_available = self.check_for_updates(about_window)
+            self.assertFalse(update_available,
+                             'Additional update found due to watershed release {}'.format(
+                                 update['build_post']['version']))
 
             # The upgraded version should be identical with the version given by
             # the update and we shouldn't have run a downgrade
             check = self.marionette.execute_script("""
               Components.utils.import("resource://gre/modules/Services.jsm");
 
               return  Services.vc.compare(arguments[0], arguments[1]);
             """, script_args=[update['build_post']['version'], update['build_pre']['version']])
@@ -194,27 +198,16 @@ class UpdateTestCase(FirefoxTestCase):
 
             # An upgrade should not change the builds locale
             self.assertEqual(update['build_post']['locale'], update['build_pre']['locale'])
 
             # Check that no application-wide add-ons have been disabled
             self.assertEqual(update['build_post']['disabled_addons'],
                              update['build_pre']['disabled_addons'])
 
-            # Bug 604364 - We do not support watershed releases yet.
-            if update_available:
-                self.download_update(about_window, wait_for_finish=False)
-                self.assertNotEqual(self.software_update.active_update.type,
-                                    update['patch']['type'],
-                                    'No further update of the same type gets offered: '
-                                    '{0} != {1}'.format(
-                                        self.software_update.active_update.type,
-                                        update['patch']['type']
-                                    ))
-
             update['success'] = True
 
         finally:
             about_window.close()
 
     def download_update(self, window, wait_for_finish=True, timeout=TIMEOUT_UPDATE_DOWNLOAD):
         """ Download the update patch.