test: consolidate and prune implementation-coupled tests

This commit is contained in:
Nils Andreas Svee committed 2026-05-17 00:28:05 +07:00
1 parent a7288cc612
commit ddd420cc21
4 files changed
+73 -262

No files matched your search

-37
View File
@@ -1217,17 +1217,6 @@ mod tests {
assert_machine_packet_meta(&line, "0", "0", "0", "none");
}
#[test]
fn machine_echo_reply_metadata_dscp_46_ecn_0_prints_values() {
let line = format_event(
&reply_event_with_meta(packet_meta(184, 46, 0)),
OutputMode::Machine,
)
.unwrap();
assert_machine_packet_meta(&line, "184", "46", "0", "none");
}
#[test]
fn machine_echo_reply_metadata_dscp_46_ecn_2_prints_values() {
let line = format_event(
@@ -1252,18 +1241,6 @@ mod tests {
assert_machine_packet_meta(&line, "none", "none", "none", "1000000234");
}
#[test]
fn machine_late_reply_metadata_unavailable_prints_none() {
let line = format_event(
&late_event_with_meta(PacketMeta::default()),
OutputMode::Machine,
)
.unwrap();
assert!(line.starts_with("event=late "));
assert_machine_packet_meta(&line, "none", "none", "none", "none");
}
#[test]
fn machine_late_reply_metadata_observed_values_prints_values() {
let line = format_event(
@@ -1276,20 +1253,6 @@ mod tests {
assert_machine_packet_meta(&line, "186", "46", "2", "none");
}
#[test]
fn machine_late_reply_metadata_kernel_rx_timestamp_prints_ns() {
let line = format_event(
&late_event_with_meta(packet_meta_with_timestamp(Some(
UNIX_EPOCH + Duration::new(2, 345),
))),
OutputMode::Machine,
)
.unwrap();
assert!(line.starts_with("event=late "));
assert_machine_packet_meta(&line, "none", "none", "none", "2000000345");
}
#[test]
fn simple_prints_readable_reply_line() {
let line = format_event(&reply_event(), OutputMode::Simple).unwrap();