From 1b6b21de96cd3095e53d2fb461cc868db4ee91ae Mon Sep 17 00:00:00 2001 From: Chris H-C Date: Thu, 18 Apr 2019 16:38:16 +0000 Subject: [PATCH] Bug 1545207 - Mock the Search Service region test in Telemetry Client Tests r=raphael We don't want spurious net connections, so we should mock the result. In addition, we need to mock it to a specific non-North-American region to ensure we don't cause an extra change to browser.search.region which may split the subsession in the middle of our tests. Differential Revision: https://phabricator.services.mozilla.com/D28059 --HG-- extra : moz-landing-system : lando --- .../tests/marionette/harness/telemetry_harness/runner.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/toolkit/components/telemetry/tests/marionette/harness/telemetry_harness/runner.py b/toolkit/components/telemetry/tests/marionette/harness/telemetry_harness/runner.py index 3fa1516a74fe..140c52bc56d9 100644 --- a/toolkit/components/telemetry/tests/marionette/harness/telemetry_harness/runner.py +++ b/toolkit/components/telemetry/tests/marionette/harness/telemetry_harness/runner.py @@ -25,6 +25,10 @@ class TelemetryTestRunner(BaseMarionetteTestRunner): # Set Firefox Client Telemetry specific preferences prefs.update( { + # Fake the geoip lookup to always return Germany to: + # * avoid net access in tests + # * stabilize browser.search.region to avoid an extra subsession (bug 1545207) + "browser.search.geoip.url": "data:application/json,{\"country_code\": \"DE\"}", "toolkit.telemetry.server": "{}/pings".format(SERVER_URL), "toolkit.telemetry.initDelay": 1, "toolkit.telemetry.minSubsessionLength": 0,