Bug 1314550 - Better failure message for update tests in case of watershed releases.
MozReview-Commit-ID: Ja8ebnKznc3
--- 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.