Bug 1330253 - Enable test_safe_browsing_initial_download on try. r=dustin,whimboo
☠☠ backed out by ddc5649b7926 ☠ ☠
authorFrancois Marier <francois@mozilla.com>
Fri, 13 Jan 2017 14:11:19 -0800
changeset 373864 5ac53d4a98ea89b7b0fbdb744ecceaef158c7c1d
parent 373863 c0c6529432da5e4049950dabe907bc32115ebed6
child 373865 405f930ae1b7a6b1294ca7bcb6587e053afaf4d9
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin, whimboo
bugs1330253
milestone54.0a1
Bug 1330253 - Enable test_safe_browsing_initial_download on try. r=dustin,whimboo MozReview-Commit-ID: 7SruSkfIhzI
testing/firefox-ui/tests/functional/security/manifest.ini
testing/firefox-ui/tests/functional/security/test_safe_browsing_initial_download.py
testing/mozharness/configs/builds/releng_base_linux_32_builds.py
testing/mozharness/configs/builds/releng_base_linux_64_builds.py
testing/mozharness/mozharness/mozilla/secrets.py
--- a/testing/firefox-ui/tests/functional/security/manifest.ini
+++ b/testing/firefox-ui/tests/functional/security/manifest.ini
@@ -5,16 +5,17 @@ tags = remote
 [test_enable_privilege.py]
 tags = local
 [test_ev_certificate.py]
 [test_mixed_content_page.py]
 [test_mixed_script_content_blocking.py]
 [test_no_certificate.py]
 tags = local
 [test_safe_browsing_initial_download.py]
+skip-if = debug # the GAPI key isn't available in debug builds
 [test_safe_browsing_notification.py]
 [test_safe_browsing_warning_pages.py]
 [test_security_notification.py]
 [test_ssl_disabled_error_page.py]
 [test_ssl_status_after_restart.py]
 skip-if = (os == "win" && os_version == "5.1") # Bug 1167179: Fails to open popups after restart
 [test_submit_unencrypted_info_warning.py]
 [test_unknown_issuer.py]
--- a/testing/firefox-ui/tests/functional/security/test_safe_browsing_initial_download.py
+++ b/testing/firefox-ui/tests/functional/security/test_safe_browsing_initial_download.py
@@ -28,19 +28,17 @@ class TestSafeBrowsingInitialDownload(Pu
         'urlclassifier.malwareTable',
         'urlclassifier.phishTable',
         'urlclassifier.trackingTable',
         'urlclassifier.trackingWhitelistTable',
     ]
 
     prefs_provider_update_time = {
         # Force an immediate download of the safebrowsing files
-        # Bug 1330253 - Leave the next line disabled until we have google API key
-        #               on the CI machines.
-        # 'browser.safebrowsing.provider.google4.nextupdatetime': 1,
+        'browser.safebrowsing.provider.google4.nextupdatetime': 1,
         'browser.safebrowsing.provider.google.nextupdatetime': 1,
         'browser.safebrowsing.provider.mozilla.nextupdatetime': 1,
     }
 
     prefs_safebrowsing = {
         'browser.safebrowsing.debug': True,
         'browser.safebrowsing.blockedURIs.enabled': True,
         'browser.safebrowsing.downloads.enabled': True,
@@ -75,20 +73,17 @@ class TestSafeBrowsingInitialDownload(Pu
         # Force the preferences for the new profile
         enforce_prefs = self.prefs_safebrowsing
         enforce_prefs.update(self.prefs_provider_update_time)
         self.marionette.enforce_gecko_prefs(enforce_prefs)
 
         self.safebrowsing_path = os.path.join(self.marionette.instance.profile.profile,
                                               'safebrowsing')
         self.safebrowsing_v2_files = self.get_safebrowsing_files(False)
-        # Bug 1330253 - Leave the next line disabled until we have google API key
-        #               on the CI machines.
-        # self.safebrowsing_v4_files = self.get_safebrowsing_files(True)
-        self.safebrowsing_v4_files = []
+        self.safebrowsing_v4_files = self.get_safebrowsing_files(True)
 
     def tearDown(self):
         try:
             # Restart with a fresh profile
             self.restart(clean=True)
         finally:
             super(TestSafeBrowsingInitialDownload, self).tearDown()
 
--- a/testing/mozharness/configs/builds/releng_base_linux_32_builds.py
+++ b/testing/mozharness/configs/builds/releng_base_linux_32_builds.py
@@ -42,17 +42,17 @@ config = {
         ('/builds/crash-stats-api.token', '/builds/crash-stats-api.token'),
         ('/builds/adjust-sdk.token', '/builds/adjust-sdk.token'),
         ('/builds/adjust-sdk-beta.token', '/builds/adjust-sdk-beta.token'),
         ('/usr/local/lib/hgext', '/usr/local/lib/hgext'),
     ],
     'secret_files': [
         {'filename': '/builds/gapi.data',
          'secret_name': 'project/releng/gecko/build/level-%(scm-level)s/gapi.data',
-         'min_scm_level': 2, 'default': 'try-build-has-no-secrets'},
+         'min_scm_level': 1},
         {'filename': '/builds/mozilla-desktop-geoloc-api.key',
          'secret_name': 'project/releng/gecko/build/level-%(scm-level)s/mozilla-desktop-geoloc-api.key',
          'min_scm_level': 2, 'default': 'try-build-has-no-secrets'},
         {'filename': '/builds/adjust-sdk.token',
          'secret_name': 'project/releng/gecko/build/level-%(scm-level)s/adjust-sdk.token',
          'min_scm_level': 2, 'default': 'try-build-has-no-secrets'},
         {'filename': '/builds/adjust-sdk-beta.token',
          'secret_name': 'project/releng/gecko/build/level-%(scm-level)s/adjust-sdk-beta.token',
--- a/testing/mozharness/configs/builds/releng_base_linux_64_builds.py
+++ b/testing/mozharness/configs/builds/releng_base_linux_64_builds.py
@@ -41,17 +41,17 @@ config = {
         ('/builds/crash-stats-api.token', '/builds/crash-stats-api.token'),
         ('/builds/adjust-sdk.token', '/builds/adjust-sdk.token'),
         ('/builds/adjust-sdk-beta.token', '/builds/adjust-sdk-beta.token'),
         ('/usr/local/lib/hgext', '/usr/local/lib/hgext'),
     ],
     'secret_files': [
         {'filename': '/builds/gapi.data',
          'secret_name': 'project/releng/gecko/build/level-%(scm-level)s/gapi.data',
-         'min_scm_level': 2, 'default': 'try-build-has-no-secrets'},
+         'min_scm_level': 1},
         {'filename': '/builds/mozilla-desktop-geoloc-api.key',
          'secret_name': 'project/releng/gecko/build/level-%(scm-level)s/mozilla-desktop-geoloc-api.key',
          'min_scm_level': 2, 'default': 'try-build-has-no-secrets'},
         {'filename': '/builds/adjust-sdk.token',
          'secret_name': 'project/releng/gecko/build/level-%(scm-level)s/adjust-sdk.token',
          'min_scm_level': 2, 'default': 'try-build-has-no-secrets'},
         {'filename': '/builds/adjust-sdk-beta.token',
          'secret_name': 'project/releng/gecko/build/level-%(scm-level)s/adjust-sdk-beta.token',
--- a/testing/mozharness/mozharness/mozilla/secrets.py
+++ b/testing/mozharness/mozharness/mozilla/secrets.py
@@ -52,17 +52,17 @@ class SecretsMixin(object):
         subst = {
             'scm-level': scm_level,
         }
 
         for sf in secret_files:
             filename = sf['filename']
             secret_name = sf['secret_name'] % subst
             min_scm_level = sf.get('min_scm_level', 0)
-            if scm_level <= min_scm_level:
+            if scm_level < min_scm_level:
                 if 'default' in sf:
                     self.info("Using default value for " + filename)
                     secret = sf['default']
                 else:
                     self.info("No default for secret; not writing " + filename)
                     continue
             else:
                 secret = self._fetch_secret(secret_name)