Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions relay-config/src/redis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ quotas:
},
});

assert_json_snapshot!(config, @r#"
assert_json_snapshot!(config, @r###"
{
"server": "redis://127.0.0.1:6379",
"max_connections": 42,
Expand All @@ -405,7 +405,7 @@ quotas:
"recycle_timeout": 2,
"recycle_check_frequency": 100
}
"#);
"###);
}

#[test]
Expand All @@ -418,7 +418,7 @@ quotas:
},
}));

assert_json_snapshot!(configs, @r#"
assert_json_snapshot!(configs, @r###"
{
"server": "redis://127.0.0.1:6379",
"max_connections": 42,
Expand All @@ -427,7 +427,7 @@ quotas:
"recycle_timeout": 2,
"recycle_check_frequency": 100
}
"#);
"###);
}

#[test]
Expand Down Expand Up @@ -534,7 +534,7 @@ max_connections: 20
},
};

assert_json_snapshot!(config, @r#"
assert_json_snapshot!(config, @r###"
{
"cluster_nodes": [
"redis://127.0.0.1:6379",
Expand All @@ -546,7 +546,7 @@ max_connections: 20
"recycle_timeout": 2,
"recycle_check_frequency": 100
}
"#);
"###);
}

#[test]
Expand All @@ -562,7 +562,7 @@ max_connections: 20
},
});

assert_json_snapshot!(configs, @r#"
assert_json_snapshot!(configs, @r###"
{
"cluster_nodes": [
"redis://127.0.0.1:6379",
Expand All @@ -574,7 +574,7 @@ max_connections: 20
"recycle_timeout": 2,
"recycle_check_frequency": 100
}
"#);
"###);
}

#[test]
Expand Down Expand Up @@ -603,7 +603,7 @@ max_connections: 20
}),
};

assert_json_snapshot!(configs, @r#"
assert_json_snapshot!(configs, @r###"
{
"project_configs": {
"server": "redis://127.0.0.1:6379",
Expand Down Expand Up @@ -632,6 +632,6 @@ max_connections: 20
"recycle_check_frequency": 100
}
}
"#);
"###);
}
}
58 changes: 30 additions & 28 deletions relay-event-normalization/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,7 @@ mod tests {

normalize_event_measurements(&mut event, None, None);

insta::assert_ron_snapshot!(SerializableAnnotated(&Annotated::new(event)), {}, @r#"
insta::assert_ron_snapshot!(SerializableAnnotated(&Annotated::new(event)), {}, @r###"
{
"type": "transaction",
"timestamp": 1619420405.0,
Expand Down Expand Up @@ -1707,7 +1707,7 @@ mod tests {
},
},
}
"#);
"###);
}

#[test]
Expand Down Expand Up @@ -1744,7 +1744,7 @@ mod tests {
normalize_event_measurements(&mut event, Some(dynamic_measurement_config), None);

// Only two custom measurements are retained, in alphabetic order (1 and 2)
insta::assert_ron_snapshot!(SerializableAnnotated(&Annotated::new(event)), {}, @r#"
insta::assert_ron_snapshot!(SerializableAnnotated(&Annotated::new(event)), {}, @r###"
{
"type": "transaction",
"timestamp": 1619420405.0,
Expand Down Expand Up @@ -1784,7 +1784,7 @@ mod tests {
},
},
}
"#);
"###);
}

#[test]
Expand All @@ -1799,7 +1799,7 @@ mod tests {
.unwrap()
.into_value()
.unwrap();
insta::assert_debug_snapshot!(measurements, @r#"
insta::assert_debug_snapshot!(measurements, @r###"
Measurements(
{
"fcp": Measurement {
Expand All @@ -1816,9 +1816,9 @@ mod tests {
},
},
)
"#);
"###);
normalize_units(&mut measurements);
insta::assert_debug_snapshot!(measurements, @r#"
insta::assert_debug_snapshot!(measurements, @r###"
Measurements(
{
"fcp": Measurement {
Expand All @@ -1837,7 +1837,7 @@ mod tests {
},
},
)
"#);
"###);
}

#[test]
Expand Down Expand Up @@ -1932,7 +1932,7 @@ mod tests {
..Default::default()
};
normalize_device_class(&mut event);
assert_debug_snapshot!(event.tags, @r#"
assert_debug_snapshot!(event.tags, @r###"
Tags(
PairList(
[
Expand All @@ -1943,7 +1943,7 @@ mod tests {
],
),
)
"#);
"###);
}

#[test]
Expand All @@ -1961,7 +1961,7 @@ mod tests {
..Default::default()
};
normalize_device_class(&mut event);
assert_debug_snapshot!(event.tags, @r#"
assert_debug_snapshot!(event.tags, @r###"
Tags(
PairList(
[
Expand All @@ -1972,7 +1972,7 @@ mod tests {
],
),
)
"#);
"###);
}

#[test]
Expand All @@ -1992,7 +1992,7 @@ mod tests {
..Default::default()
};
normalize_device_class(&mut event);
assert_debug_snapshot!(event.tags, @r#"
assert_debug_snapshot!(event.tags, @r###"
Tags(
PairList(
[
Expand All @@ -2003,7 +2003,7 @@ mod tests {
],
),
)
"#);
"###);
}

#[test]
Expand All @@ -2023,7 +2023,7 @@ mod tests {
..Default::default()
};
normalize_device_class(&mut event);
assert_debug_snapshot!(event.tags, @r#"
assert_debug_snapshot!(event.tags, @r###"
Tags(
PairList(
[
Expand All @@ -2034,7 +2034,7 @@ mod tests {
],
),
)
"#);
"###);
}

#[test]
Expand All @@ -2054,7 +2054,7 @@ mod tests {
..Default::default()
};
normalize_device_class(&mut event);
assert_debug_snapshot!(event.tags, @r#"
assert_debug_snapshot!(event.tags, @r###"
Tags(
PairList(
[
Expand All @@ -2065,7 +2065,7 @@ mod tests {
],
),
)
"#);
"###);
}

#[test]
Expand Down Expand Up @@ -2712,7 +2712,7 @@ mod tests {
..Default::default()
};
normalize_device_class(&mut event);
assert_debug_snapshot!(event.tags, @r#"
assert_debug_snapshot!(event.tags, @r###"
Tags(
PairList(
[
Expand All @@ -2723,7 +2723,7 @@ mod tests {
],
),
)
"#);
"###);
}

#[test]
Expand Down Expand Up @@ -4630,7 +4630,7 @@ mod tests {
.first()
.unwrap();

assert_debug_snapshot!(exception.meta(), @r#"
assert_debug_snapshot!(exception.meta(), @r###"
Meta {
remarks: [],
errors: [
Expand All @@ -4657,7 +4657,8 @@ mod tests {
},
),
),
}"#);
}
"###);
}

#[test]
Expand Down Expand Up @@ -4709,7 +4710,7 @@ mod tests {
.first()
.unwrap()
.meta();
assert_debug_snapshot!(debug_image_meta, @r#"
assert_debug_snapshot!(debug_image_meta, @r###"
Meta {
remarks: [],
errors: [
Expand All @@ -4728,7 +4729,8 @@ mod tests {
{},
),
),
}"#);
}
"###);
}

#[test]
Expand Down Expand Up @@ -4798,7 +4800,7 @@ mod tests {
}"#;
let mut event = Annotated::<Event>::from_json(json).unwrap().0.unwrap();
normalize_trace_context_tags(&mut event);
insta::assert_ron_snapshot!(SerializableAnnotated(&Annotated::new(event)), {}, @r#"
insta::assert_ron_snapshot!(SerializableAnnotated(&Annotated::new(event)), {}, @r###"
{
"type": "transaction",
"timestamp": 2.0,
Expand Down Expand Up @@ -4839,7 +4841,7 @@ mod tests {
},
},
}
"#);
"###);
}

#[test]
Expand Down Expand Up @@ -4870,7 +4872,7 @@ mod tests {
}"#;
let mut event = Annotated::<Event>::from_json(json).unwrap().0.unwrap();
normalize_trace_context_tags(&mut event);
insta::assert_ron_snapshot!(SerializableAnnotated(&Annotated::new(event)), {}, @r#"
insta::assert_ron_snapshot!(SerializableAnnotated(&Annotated::new(event)), {}, @r###"
{
"type": "transaction",
"timestamp": 2.0,
Expand Down Expand Up @@ -4911,6 +4913,6 @@ mod tests {
},
},
}
"#);
"###);
}
}
8 changes: 4 additions & 4 deletions relay-event-normalization/src/mechanism.rs
Original file line number Diff line number Diff line change
Expand Up @@ -989,12 +989,12 @@ mod tests {
};

normalize_mechanism(&mut good_mechanism, None);
insta::assert_ron_snapshot!(SerializableAnnotated(&Annotated::new(good_mechanism)), @r#"
insta::assert_ron_snapshot!(SerializableAnnotated(&Annotated::new(good_mechanism)), @r###"
{
"type": "generic",
"help_link": "https://example.com/",
}
"#);
"###);

let mut bad_mechanism = Mechanism {
ty: Annotated::new("generic".to_owned()),
Expand All @@ -1003,7 +1003,7 @@ mod tests {
};

normalize_mechanism(&mut bad_mechanism, None);
insta::assert_ron_snapshot!(SerializableAnnotated(&Annotated::new(bad_mechanism)), @r#"
insta::assert_ron_snapshot!(SerializableAnnotated(&Annotated::new(bad_mechanism)), @r###"
{
"type": "generic",
"help_link": (),
Expand All @@ -1023,6 +1023,6 @@ mod tests {
},
},
}
"#);
"###);
}
}
Loading
Loading