Skip to content

Commit

Permalink
Bug 1601893 - Fix Remote Settings test about events on release r=glas…
Browse files Browse the repository at this point in the history
…serc

Differential Revision: https://phabricator.services.mozilla.com/D57761

--HG--
extra : moz-landing-system : lando
  • Loading branch information
leplatrem committed Dec 19, 2019
1 parent 762801c commit 7e8fc19
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions services/settings/test/unit/test_attachments_downloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,28 +215,30 @@ add_task(async function test_downloader_is_accessible_via_client() {
add_task(clear_state);

add_task(async () => {
const client = RemoteSettings("some-collection");
await withFakeChannel("nightly", async () => {
const client = RemoteSettings("some-collection");

const record = {
attachment: {
...RECORD.attachment,
location: "404-error.pem",
},
};

try {
await client.attachments.download(record, { retry: 0 });
} catch (e) {}

TelemetryTestUtils.assertEvents([
[
"uptake.remotecontent.result",
"uptake",
"remotesettings",
UptakeTelemetry.STATUS.DOWNLOAD_ERROR,
{
source: client.identifier,
const record = {
attachment: {
...RECORD.attachment,
location: "404-error.pem",
},
],
]);
};

try {
await client.attachments.download(record, { retry: 0 });
} catch (e) {}

TelemetryTestUtils.assertEvents([
[
"uptake.remotecontent.result",
"uptake",
"remotesettings",
UptakeTelemetry.STATUS.DOWNLOAD_ERROR,
{
source: client.identifier,
},
],
]);
});
});

0 comments on commit 7e8fc19

Please sign in to comment.