Created
November 18, 2021 13:15
-
-
Save badboy/04b7c09d42568bcd3910b193f45c9e2e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git toolkit/components/glean/tests/xpcshell/test_FOGPrefs.js toolkit/components/glean/tests/xpcshell/test_FOGPrefs.js | |
index 6cfeec020da69..227e1bbbdeee4 100644 | |
--- toolkit/components/glean/tests/xpcshell/test_FOGPrefs.js | |
+++ toolkit/components/glean/tests/xpcshell/test_FOGPrefs.js | |
@@ -9,14 +9,17 @@ const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); | |
// FOG needs a profile directory to put its data in. | |
do_get_profile(); | |
-const FOG = Cc["@mozilla.org/toolkit/glean;1"].createInstance(Ci.nsIFOG); | |
-// We need to initialize it once, otherwise operations will be stuck in the pre-init queue. | |
-FOG.initializeFOG(); | |
- | |
const TELEMETRY_SERVER_PREF = "toolkit.telemetry.server"; | |
const UPLOAD_PREF = "datareporting.healthreport.uploadEnabled"; | |
const LOCALHOST_PREF = "telemetry.fog.test.localhost_port"; | |
+const FOG = Cc["@mozilla.org/toolkit/glean;1"].createInstance(Ci.nsIFOG); | |
+// We want Glean to use a localhost server so we can be SURE not to send data to the outside world. | |
+// Yes, the port spells GLEAN on a T9 keyboard, why do you ask? | |
+Services.prefs.setIntPref(LOCALHOST_PREF, 45326); | |
+// We need to initialize it once, otherwise operations will be stuck in the pre-init queue. | |
+FOG.initializeFOG(); | |
+ | |
add_task(function test_fog_upload_only() { | |
// Don't forget to point the telemetry server to localhost, or Telemetry | |
// might make a non-local connection during the test run. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment