Skip to content

Commit

Permalink
Use the same test ping names consistently throughout all tests
Browse files Browse the repository at this point in the history
This is in preparation of the further changes coming to how we handle
pings.
  • Loading branch information
badboy committed Nov 19, 2024
1 parent c0e5bd1 commit 2b80301
Show file tree
Hide file tree
Showing 17 changed files with 59 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ class GleanTest {
category = "telemetry",
lifetime = Lifetime.PING,
name = "string_metric",
sendInPings = listOf("default"),
sendInPings = listOf("store1"),
),
)

Expand Down
34 changes: 17 additions & 17 deletions glean-core/python/tests/data/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ telemetry:
notification_emails:
- [email protected]
send_in_pings:
- core
- store1
expires: 2100-01-01

core_ping:
Expand All @@ -37,7 +37,7 @@ core_ping:
notification_emails:
- [email protected]
send_in_pings:
- core
- store1
expires: 2100-01-01

created:
Expand All @@ -52,7 +52,7 @@ core_ping:
notification_emails:
- [email protected]
send_in_pings:
- core
- store1
expires: 2100-01-01

sessions:
Expand All @@ -66,7 +66,7 @@ core_ping:
notification_emails:
- [email protected]
send_in_pings:
- core
- store1
expires: 2100-01-01

durations:
Expand All @@ -82,7 +82,7 @@ core_ping:
notification_emails:
- [email protected]
send_in_pings:
- core
- store1
expires: 2100-01-01

searches:
Expand All @@ -105,7 +105,7 @@ core_ping:
notification_emails:
- [email protected]
send_in_pings:
- core
- store1
expires: 2100-01-01

flash_usage:
Expand All @@ -120,7 +120,7 @@ core_ping:
notification_emails:
- [email protected]
send_in_pings:
- core
- store1
expires: 2100-01-01

default_browser:
Expand All @@ -134,7 +134,7 @@ core_ping:
notification_emails:
- [email protected]
send_in_pings:
- core
- store1
expires: 2100-01-01

environment:
Expand All @@ -149,7 +149,7 @@ environment:
notification_emails:
- [email protected]
send_in_pings:
- core
- store1
expires: 2100-01-01

os:
Expand All @@ -163,7 +163,7 @@ environment:
notification_emails:
- [email protected]
send_in_pings:
- core
- store1
expires: 2100-01-01

os_version:
Expand All @@ -177,7 +177,7 @@ environment:
notification_emails:
- [email protected]
send_in_pings:
- core
- store1
expires: 2100-01-01

device:
Expand All @@ -194,7 +194,7 @@ environment:
notification_emails:
- [email protected]
send_in_pings:
- core
- store1
expires: 2100-01-01

arch:
Expand All @@ -221,7 +221,7 @@ environment:
notification_emails:
- [email protected]
send_in_pings:
- core
- store1
expires: 2100-01-01

default_search:
Expand All @@ -236,7 +236,7 @@ environment:
notification_emails:
- [email protected]
send_in_pings:
- core
- store1
expires: 2100-01-01

display_version:
Expand All @@ -251,7 +251,7 @@ environment:
notification_emails:
- [email protected]
send_in_pings:
- core
- store1
expires: 2100-01-01

distribution_id:
Expand All @@ -266,7 +266,7 @@ environment:
notification_emails:
- [email protected]
send_in_pings:
- core
- store1
expires: 2100-01-01

campaign_id:
Expand All @@ -281,7 +281,7 @@ environment:
notification_emails:
- [email protected]
send_in_pings:
- core
- store1
expires: 2100-01-01

event_example:
Expand Down
6 changes: 3 additions & 3 deletions glean-core/rlb/src/private/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ mod test {
let metric: EventMetric<traits::NoExtraKeys> = EventMetric::new(CommonMetricData {
name: "event".into(),
category: "test".into(),
send_in_pings: vec!["test1".into()],
send_in_pings: vec!["store1".into()],
..Default::default()
});

Expand Down Expand Up @@ -133,7 +133,7 @@ mod test {
let metric: EventMetric<SomeExtra> = EventMetric::new(CommonMetricData {
name: "event".into(),
category: "test".into(),
send_in_pings: vec!["test1".into()],
send_in_pings: vec!["store1".into()],
..Default::default()
});

Expand Down Expand Up @@ -188,7 +188,7 @@ mod test {
CommonMetricData {
name: "event".into(),
category: "test".into(),
send_in_pings: vec!["test1".into()],
send_in_pings: vec!["store1".into()],
..Default::default()
},
vec!["key1".into(), "key2".into()],
Expand Down
8 changes: 4 additions & 4 deletions glean-core/rlb/src/private/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ mod test {
let metric: ObjectMetric<SimpleArray> = ObjectMetric::new(CommonMetricData {
name: "object".into(),
category: "test".into(),
send_in_pings: vec!["test1".into()],
send_in_pings: vec!["store1".into()],
..Default::default()
});

Expand Down Expand Up @@ -144,7 +144,7 @@ mod test {
let metric: ObjectMetric<BalloonsObject> = ObjectMetric::new(CommonMetricData {
name: "object".into(),
category: "test".into(),
send_in_pings: vec!["test1".into()],
send_in_pings: vec!["store1".into()],
..Default::default()
});

Expand Down Expand Up @@ -178,7 +178,7 @@ mod test {
let metric: ObjectMetric<SimpleArray> = ObjectMetric::new(CommonMetricData {
name: "object".into(),
category: "test".into(),
send_in_pings: vec!["test1".into()],
send_in_pings: vec!["store1".into()],
..Default::default()
});

Expand Down Expand Up @@ -225,7 +225,7 @@ mod test {
let metric: ObjectMetric<StackTrace> = ObjectMetric::new(CommonMetricData {
name: "object".into(),
category: "test".into(),
send_in_pings: vec!["test1".into()],
send_in_pings: vec!["store1".into()],
..Default::default()
});

Expand Down
2 changes: 1 addition & 1 deletion glean-core/rlb/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ fn basic_metrics_should_be_cleared_when_disabling_uploading() {
let metric = private::StringMetric::new(CommonMetricData {
name: "string_metric".into(),
category: "telemetry".into(),
send_in_pings: vec!["default".into()],
send_in_pings: vec!["store1".into()],
lifetime: Lifetime::Ping,
disabled: false,
..Default::default()
Expand Down
2 changes: 1 addition & 1 deletion glean-core/rlb/tests/custom_distribution_buffered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ mod metrics {
CommonMetricData {
name: "measure".into(),
category: "sample".into(),
send_in_pings: vec!["validation".into()],
send_in_pings: vec!["store1".into()],
lifetime: Lifetime::Ping,
disabled: false,
..Default::default()
Expand Down
2 changes: 1 addition & 1 deletion glean-core/rlb/tests/memory_distribution_buffered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ mod metrics {
CommonMetricData {
name: "measure".into(),
category: "sample".into(),
send_in_pings: vec!["validation".into()],
send_in_pings: vec!["store1".into()],
lifetime: Lifetime::Ping,
disabled: false,
..Default::default()
Expand Down
2 changes: 1 addition & 1 deletion glean-core/rlb/tests/timing_distribution_buffered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ mod metrics {
CommonMetricData {
name: "boo".into(),
category: "sample".into(),
send_in_pings: vec!["validation".into()],
send_in_pings: vec!["store1".into()],
lifetime: Lifetime::Ping,
disabled: false,
..Default::default()
Expand Down
2 changes: 1 addition & 1 deletion glean-core/rlb/tests/timing_distribution_single_sample.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mod metrics {
CommonMetricData {
name: "boo".into(),
category: "sample".into(),
send_in_pings: vec!["validation".into()],
send_in_pings: vec!["store1".into()],
lifetime: Lifetime::Ping,
disabled: false,
..Default::default()
Expand Down
2 changes: 1 addition & 1 deletion glean-core/src/event_database/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ mod test {
let (mut glean, dir) = new_glean(None);
let db = EventDatabase::new(dir.path()).unwrap();

let test_storage = "test-storage";
let test_storage = "store1";
let test_category = "category";
let test_name = "name";
let test_timestamp = 2;
Expand Down
12 changes: 6 additions & 6 deletions glean-core/src/ping/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,15 +426,15 @@ mod test {
let (mut glean, _t) = new_glean(None);
let ping_maker = PingMaker::new();

assert_eq!(0, ping_maker.get_ping_seq(&glean, "custom"));
assert_eq!(1, ping_maker.get_ping_seq(&glean, "custom"));
assert_eq!(0, ping_maker.get_ping_seq(&glean, "store1"));
assert_eq!(1, ping_maker.get_ping_seq(&glean, "store1"));

glean.set_upload_enabled(false);
assert_eq!(0, ping_maker.get_ping_seq(&glean, "custom"));
assert_eq!(0, ping_maker.get_ping_seq(&glean, "custom"));
assert_eq!(0, ping_maker.get_ping_seq(&glean, "store1"));
assert_eq!(0, ping_maker.get_ping_seq(&glean, "store1"));

glean.set_upload_enabled(true);
assert_eq!(0, ping_maker.get_ping_seq(&glean, "custom"));
assert_eq!(1, ping_maker.get_ping_seq(&glean, "custom"));
assert_eq!(0, ping_maker.get_ping_seq(&glean, "store1"));
assert_eq!(1, ping_maker.get_ping_seq(&glean, "store1"));
}
}
6 changes: 3 additions & 3 deletions glean-core/tests/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ fn snapshot_sorts_the_timestamps() {
fn ensure_custom_ping_events_dont_overflow() {
let (glean, _dir) = new_glean(None);

let store_name = "store-name";
let store_name = "store1";
let event_meta = CommonMetricData {
name: "name".into(),
category: "category".into(),
Expand Down Expand Up @@ -441,7 +441,7 @@ fn ensure_custom_ping_events_dont_overflow() {
fn ensure_custom_ping_events_from_multiple_runs_work() {
let (mut tempdir, _) = tempdir();

let store_name = "store-name";
let store_name = "store1";
let event = EventMetric::new(
CommonMetricData {
name: "name".into(),
Expand Down Expand Up @@ -570,7 +570,7 @@ fn with_event_timestamps() {
};
let glean = Glean::new(cfg).unwrap();

let store_name = "store-name";
let store_name = "store1";
let event = EventMetric::new(
CommonMetricData {
name: "name".into(),
Expand Down
10 changes: 5 additions & 5 deletions glean-core/tests/rate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn rate_smoke() {
let metric: RateMetric = RateMetric::new(CommonMetricData {
name: "rate".into(),
category: "test".into(),
send_in_pings: vec!["test1".into()],
send_in_pings: vec!["store1".into()],
..Default::default()
});

Expand Down Expand Up @@ -52,7 +52,7 @@ fn numerator_smoke() {
let metric: NumeratorMetric = NumeratorMetric::new(CommonMetricData {
name: "rate".into(),
category: "test".into(),
send_in_pings: vec!["test1".into()],
send_in_pings: vec!["store1".into()],
..Default::default()
});

Expand Down Expand Up @@ -89,14 +89,14 @@ fn denominator_smoke() {
let meta1 = CommonMetricData {
name: "rate1".into(),
category: "test".into(),
send_in_pings: vec!["test1".into()],
send_in_pings: vec!["store1".into()],
..Default::default()
};

let meta2 = CommonMetricData {
name: "rate2".into(),
category: "test".into(),
send_in_pings: vec!["test1".into()],
send_in_pings: vec!["store1".into()],
..Default::default()
};

Expand All @@ -105,7 +105,7 @@ fn denominator_smoke() {
CommonMetricData {
name: "counter".into(),
category: "test".into(),
send_in_pings: vec!["test1".into()],
send_in_pings: vec!["store1".into()],
..Default::default()
},
vec![meta1.clone(), meta2.clone()],
Expand Down
Loading

0 comments on commit 2b80301

Please sign in to comment.