summaryrefslogtreecommitdiffstats
path: root/toolkit/components/glean/tests/pytest
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/glean/tests/pytest')
-rw-r--r--toolkit/components/glean/tests/pytest/jogfile_output16
-rw-r--r--toolkit/components/glean/tests/pytest/metrics_test.yaml30
-rw-r--r--toolkit/components/glean/tests/pytest/metrics_test_output8
-rw-r--r--toolkit/components/glean/tests/pytest/pings_test_output10
4 files changed, 50 insertions, 14 deletions
diff --git a/toolkit/components/glean/tests/pytest/jogfile_output b/toolkit/components/glean/tests/pytest/jogfile_output
index 510b4995c5..7456bb1ffd 100644
--- a/toolkit/components/glean/tests/pytest/jogfile_output
+++ b/toolkit/components/glean/tests/pytest/jogfile_output
@@ -25,7 +25,7 @@
[
"metrics"
],
- "application",
+ "ping",
false,
{
"bucket_count": 100,
@@ -129,7 +129,7 @@
[
"metrics"
],
- "application",
+ "ping",
false,
{
"memory_unit": "kilobyte"
@@ -180,7 +180,7 @@
[
"metrics"
],
- "application",
+ "ping",
false,
{
"time_unit": "nanosecond"
@@ -313,6 +313,8 @@
false,
true,
true,
+ true,
+ [],
[
"background",
"dirty_startup",
@@ -325,6 +327,8 @@
true,
true,
true,
+ true,
+ [],
[]
],
[
@@ -333,6 +337,8 @@
false,
true,
true,
+ true,
+ [],
[
"background",
"max_capacity",
@@ -345,6 +351,8 @@
false,
true,
true,
+ true,
+ [],
[
"overdue",
"reschedule",
@@ -359,6 +367,8 @@
true,
true,
false,
+ true,
+ [],
[]
]
]
diff --git a/toolkit/components/glean/tests/pytest/metrics_test.yaml b/toolkit/components/glean/tests/pytest/metrics_test.yaml
index 6d9a4f8c0e..2bdcd1877f 100644
--- a/toolkit/components/glean/tests/pytest/metrics_test.yaml
+++ b/toolkit/components/glean/tests/pytest/metrics_test.yaml
@@ -6,11 +6,6 @@
# automatically converted to platform-specific code at build time using the
# `glean_parser` PyPI package.
-# This file is presently for Internal FOG Use Only.
-# You should not add metrics here until probably about January of 2021.
-# If you're looking for the metrics.yaml for Geckoveiw Streaming Telemetry,
-# you can find that one in toolkit/components/telemetry/geckoview/streaming.
-
---
$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0
@@ -29,6 +24,8 @@ test:
data_reviews:
- https://example.com
telemetry_mirror: SOME_BOOL_SCALAR
+ no_lint:
+ - GIFFT_NON_PING_LIFETIME
labeled_boolean_metric:
type: labeled_boolean
@@ -44,6 +41,8 @@ test:
data_reviews:
- https://example.com
telemetry_mirror: SOME_KEYED_BOOL_SCALAR
+ no_lint:
+ - GIFFT_NON_PING_LIFETIME
labeled_boolean_metric_labels:
type: labeled_boolean
@@ -70,6 +69,8 @@ test:
- nine_labels
- ten_labels
telemetry_mirror: SOME_OTHER_KEYED_BOOL_SCALAR
+ no_lint:
+ - GIFFT_NON_PING_LIFETIME
counter_metric:
type: counter
@@ -85,6 +86,8 @@ test:
data_reviews:
- https://example.com
telemetry_mirror: SOME_UINT_SCALAR
+ no_lint:
+ - GIFFT_NON_PING_LIFETIME
labeled_counter_metric:
type: labeled_counter
@@ -100,6 +103,8 @@ test:
data_reviews:
- https://example.com
telemetry_mirror: SOME_KEYED_UINT_SCALAR
+ no_lint:
+ - GIFFT_NON_PING_LIFETIME
labeled_counter_metric_labels:
type: labeled_counter
@@ -118,6 +123,8 @@ test:
- one_label
- two_labels
telemetry_mirror: SOME_OTHER_KEYED_UINT_SCALAR
+ no_lint:
+ - GIFFT_NON_PING_LIFETIME
string_metric:
type: string
@@ -133,6 +140,8 @@ test:
data_reviews:
- https://example.com
telemetry_mirror: SOME_STRING_SCALAR
+ no_lint:
+ - GIFFT_NON_PING_LIFETIME
labeled_string_metric:
type: labeled_string
@@ -179,6 +188,8 @@ test:
data_reviews:
- https://example.com
telemetry_mirror: YET_ANOTHER_KEYED_BOOL_SCALAR
+ no_lint:
+ - GIFFT_NON_PING_LIFETIME
text_metric:
type: text
@@ -209,6 +220,8 @@ test:
data_reviews:
- https://example.com
telemetry_mirror: SOME_OTHER_UINT_SCALAR
+ no_lint:
+ - GIFFT_NON_PING_LIFETIME
timing_distribution_metric:
type: timing_distribution
@@ -216,7 +229,6 @@ test:
description: |
A multi-line
description
- lifetime: application
notification_emails:
- glean-team@mozilla.com
bugs:
@@ -231,7 +243,6 @@ test:
description: |
A multi-line
description
- lifetime: application
notification_emails:
- glean-team@mozilla.com
bugs:
@@ -247,7 +258,6 @@ test:
description: |
A multi-line
description
- lifetime: application
notification_emails:
- glean-team@mozilla.com
bugs:
@@ -275,6 +285,8 @@ test.nested:
data_reviews:
- https://example.com
telemetry_mirror: SOME_OTHER_STRING_SCALAR
+ no_lint:
+ - GIFFT_NON_PING_LIFETIME
datetime_metric:
type: datetime
@@ -290,6 +302,8 @@ test.nested:
data_reviews:
- https://example.com
telemetry_mirror: SOME_STILL_OTHER_STRING_SCALAR
+ no_lint:
+ - GIFFT_NON_PING_LIFETIME
event_metric:
type: event
diff --git a/toolkit/components/glean/tests/pytest/metrics_test_output b/toolkit/components/glean/tests/pytest/metrics_test_output
index 0f93eb032d..79a1b487fa 100644
--- a/toolkit/components/glean/tests/pytest/metrics_test_output
+++ b/toolkit/components/glean/tests/pytest/metrics_test_output
@@ -62,7 +62,7 @@ pub mod test {
name: "custom_distribution_metric".into(),
category: "test".into(),
send_in_pings: vec!["metrics".into()],
- lifetime: Lifetime::Application,
+ lifetime: Lifetime::Ping,
disabled: false,
..Default::default()
}, 0, 100, 100, HistogramType::Linear)
@@ -270,7 +270,7 @@ pub mod test {
name: "memory_distribution_metric".into(),
category: "test".into(),
send_in_pings: vec!["metrics".into()],
- lifetime: Lifetime::Application,
+ lifetime: Lifetime::Ping,
disabled: false,
..Default::default()
}, MemoryUnit::Kilobyte)
@@ -350,7 +350,7 @@ pub mod test {
name: "timing_distribution_metric".into(),
category: "test".into(),
send_in_pings: vec!["metrics".into()],
- lifetime: Lifetime::Application,
+ lifetime: Lifetime::Ping,
disabled: false,
..Default::default()
}, TimeUnit::Nanosecond)
@@ -373,7 +373,9 @@ pub mod test_nested {
#[derive(Debug, Hash, Eq, PartialEq, ::glean::traits::__serde::Serialize, ::glean::traits::__serde::Deserialize)]
#[serde(deny_unknown_fields)]
pub struct AnObjectObjectItem {
+ #[serde(skip_serializing_if = "Option::is_none")]
pub colour: Option<String>,
+ #[serde(skip_serializing_if = "Option::is_none")]
pub diameter: Option<i64>,
}
diff --git a/toolkit/components/glean/tests/pytest/pings_test_output b/toolkit/components/glean/tests/pytest/pings_test_output
index 97c0793b1f..7214cd1756 100644
--- a/toolkit/components/glean/tests/pytest/pings_test_output
+++ b/toolkit/components/glean/tests/pytest/pings_test_output
@@ -21,6 +21,8 @@ pub static not_baseline: Lazy<Ping> = Lazy::new(|| {
false,
true,
true,
+ true,
+ vec![],
vec!["background".into(), "dirty_startup".into(), "foreground".into()],
)
});
@@ -38,6 +40,8 @@ pub static not_deletion_request: Lazy<Ping> = Lazy::new(|| {
true,
true,
true,
+ true,
+ vec![],
vec![],
)
});
@@ -53,6 +57,8 @@ pub static not_events: Lazy<Ping> = Lazy::new(|| {
false,
true,
true,
+ true,
+ vec![],
vec!["background".into(), "max_capacity".into(), "startup".into()],
)
});
@@ -72,6 +78,8 @@ pub static not_metrics: Lazy<Ping> = Lazy::new(|| {
false,
true,
true,
+ true,
+ vec![],
vec!["overdue".into(), "reschedule".into(), "today".into(), "tomorrow".into(), "upgrade".into()],
)
});
@@ -85,6 +93,8 @@ pub static not_ohttp: Lazy<Ping> = Lazy::new(|| {
true,
true,
false,
+ true,
+ vec![],
vec![],
)
});