Skip to content

Commit

Permalink
Bug 1807667 - Change remote settings test dummy endpoint r=leplatrem,…
Browse files Browse the repository at this point in the history
…robwu,webdriver-reviewers,necko-reviewers,kershaw

For remote settings testing "data:,#remote-settings-dummy/v1" URL is used:
* data url to avoid network activity
* ends with /v1 to match certain format, as checked at https://searchfox.org/mozilla-central/rev/a003f4e458fa9a1d2bb9ccb8e22ffb7b604835be/services/common/kinto-http-client.js#2224
* has empty body to not being mistaken with something useful

Differential Revision: https://phabricator.services.mozilla.com/D165552
  • Loading branch information
lotas committed Jan 5, 2023
1 parent 0c1dafd commit 9f4ad7c
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion netwerk/test/unit/test_http2-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ add_task(async function setup() {

Services.prefs.setStringPref(
"services.settings.server",
`data:text/html,test`
`data:,#remote-settings-dummy/v1`
);

Services.prefs.setBoolPref("network.http.http2.enabled", true);
Expand Down
2 changes: 1 addition & 1 deletion netwerk/test/unit/test_http2_with_proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ add_setup(async function setup() {

Services.prefs.setStringPref(
"services.settings.server",
`data:text/html,test`
`data:,#remote-settings-dummy/v1`
);

proxy = new NodeHTTP2ProxyServer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class GeckoInstance(object):
# Tests don't wait for the notification button security delay
"security.notification_enable_delay": 0,
# Ensure blocklist updates don't hit the network
"services.settings.server": "http://%(server)s/dummy/blocklist/",
"services.settings.server": "data:,#remote-settings-dummy/v1",
# Disable password capture, so that tests that include forms aren"t
# influenced by the presence of the persistent doorhanger notification
"signon.rememberSignons": False,
Expand Down
2 changes: 1 addition & 1 deletion testing/profiles/common/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ user_pref("security.certerrors.mitm.priming.enabled", false);
user_pref("security.turn_off_all_security_so_that_viruses_can_take_over_this_computer", true);
user_pref("xpinstall.signatures.required", false);
// Prevent Remote Settings to issue non local connections.
user_pref("services.settings.server", "http://localhost/remote-settings-dummy/v1");
user_pref("services.settings.server", "data:,#remote-settings-dummy/v1");
// Ensure autoplay is enabled for all platforms.
user_pref("media.autoplay.default", 0); // 0=Allowed, 1=Blocked, 2=Prompt
user_pref("media.autoplay.blocking_policy", 0);
Expand Down
2 changes: 1 addition & 1 deletion testing/profiles/unittest-required/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ user_pref("security.default_personal_cert", "Select Automatically"); // Need to
// Existing tests don't wait for the notification button security delay
user_pref("security.notification_enable_delay", 0);
// Ensure blocklist updates don't hit the network
user_pref("services.settings.server", "http://{server}/dummy-kinto/v1");
user_pref("services.settings.server", "data:,#remote-settings-dummy/v1");
user_pref("shell.checkDefaultClient", false);
// Disable password capture, so that mochitests that include forms aren't
// influenced by the presence of the persistent doorhanger notification.
Expand Down
2 changes: 1 addition & 1 deletion testing/profiles/xpcshell/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ user_pref("media.gmp-manager.url.override", "http://%(server)s/dummy-gmp-manager
user_pref("toolkit.telemetry.server", "https://%(server)s/telemetry-dummy");
user_pref("telemetry.fog.test.localhost_port", -1);
// Prevent Remote Settings to issue non local connections.
user_pref("services.settings.server", "http://localhost/remote-settings-dummy/v1");
user_pref("services.settings.server", "data:,#remote-settings-dummy/v1");
// Prevent intermediate preloads to be downloaded on Remote Settings polling.
user_pref("security.remote_settings.intermediates.enabled", false);
// The process priority manager only shifts priorities when it has at least
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ prefs =
# doesn't interfere with running our tests while IDB operations are in
# flight by overriding the remote settings server URL to
# ensure that the IDB database isn't created in the first place.
services.settings.server=http://localhost:7777/remote-settings-dummy/v1
services.settings.server=data:,#remote-settings-dummy/v1

# NOTE: these tests seems to be timing out because it takes too much time to
# run all tests and then fully exiting the test.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tags = webextensions webextensions-e10s
# flight by overriding the remote settings server URL to
# ensure that the IDB database isn't created in the first place.
prefs =
services.settings.server=http://localhost:7777/remote-settings-dummy/v1
services.settings.server=data:,#remote-settings-dummy/v1

[include:xpcshell-common-e10s.ini]
skip-if =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dupe-manifest =
# flight by overriding the remote settings server URL to
# ensure that the IDB database isn't created in the first place.
prefs =
services.settings.server=http://localhost:7777/remote-settings-dummy/v1
services.settings.server=data:,#remote-settings-dummy/v1

# Bug 1646182: Test the legacy ExtensionPermission backend until we fully
# migrate to rkv
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tags = webextensions remote-webextensions
# flight by overriding the remote settings server URL to
# ensure that the IDB database isn't created in the first place.
prefs =
services.settings.server=http://localhost:7777/remote-settings-dummy/v1
services.settings.server=data:,#remote-settings-dummy/v1

[include:xpcshell-common.ini]
skip-if =
Expand Down
2 changes: 1 addition & 1 deletion toolkit/components/extensions/test/xpcshell/xpcshell.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ tags = webextensions in-process-webextensions condprof
# flight by overriding the remote settings server URL to
# ensure that the IDB database isn't created in the first place.
prefs =
services.settings.server=http://localhost:7777/remote-settings-dummy/v1
services.settings.server=data:,#remote-settings-dummy/v1

# This file contains tests which are not affected by multi-process
# configuration, or do not support out-of-process content or extensions
Expand Down
2 changes: 1 addition & 1 deletion toolkit/mozapps/extensions/internal/AddonTestUtils.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ var AddonTestUtils = {
);
Services.prefs.setCharPref(
"services.settings.server",
"http://localhost/dummy-kinto/v1"
"data:,#remote-settings-dummy/v1"
);

// By default ignore bundled add-ons
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ add_task(async function fetch_invalid_mlbf_record() {
Downloader._RESOURCE_BASE_URL = "invalid://bogus";
// NetworkError is expected here. The JSON.parse error could be triggered via
// _baseAttachmentsURL < downloadAsBytes < download < download < _fetchMLBF if
// the request to services.settings.server (http://localhost/dummy-kinto/v1)
// the request to services.settings.server ("data:,#remote-settings-dummy/v1")
// is fulfilled (but with invalid JSON). That request is not expected to be
// fulfilled in the first place, but that is not a concern of this test.
// This test passes if _fetchMLBF() rejects when given an invalid record.
Expand Down

0 comments on commit 9f4ad7c

Please sign in to comment.