mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1539240 - Slim down os data in environment of ping r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D24957 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
d3b5c44b6b
commit
ffd99e653e
@ -290,7 +290,11 @@ var EcosystemTelemetry = {
|
||||
},
|
||||
system: {
|
||||
memoryMB: currentEnv.system.memoryMB,
|
||||
os: currentEnv.system.os,
|
||||
os: {
|
||||
name: currentEnv.system.os.name,
|
||||
version: currentEnv.system.os.version,
|
||||
locale: currentEnv.system.os.locale,
|
||||
},
|
||||
cpu: {
|
||||
speedMHz: currentEnv.system.cpu.speedMHz,
|
||||
},
|
||||
|
@ -27,12 +27,14 @@ function checkPingStructure(ping, type, reason) {
|
||||
|
||||
// Check that the environment is indeed minimal
|
||||
const ALLOWED_ENVIRONMENT_KEYS = ["settings", "system", "profile"];
|
||||
Assert.deepEqual(ALLOWED_ENVIRONMENT_KEYS, Object.keys(environment), "Environment should only contain limited set of keys.");
|
||||
Assert.deepEqual(ALLOWED_ENVIRONMENT_KEYS, Object.keys(environment), "Environment should only contain a limited set of keys.");
|
||||
|
||||
// Check that fields of the environment are indeed minimal
|
||||
Assert.deepEqual(["locale"], Object.keys(environment.settings), "Settings environment should only contain locale");
|
||||
Assert.deepEqual(["cpu", "memoryMB", "os"], Object.keys(environment.system).sort(),
|
||||
"System environment should contain limit set of keys");
|
||||
"System environment should contain a limited set of keys");
|
||||
Assert.deepEqual(["locale", "name", "version"], Object.keys(environment.system.os).sort(),
|
||||
"system.environment.os should contain a limited set of keys");
|
||||
|
||||
// Check the payload for required fields.
|
||||
let payload = ping.payload;
|
||||
|
Loading…
Reference in New Issue
Block a user