exporting ECB2
This commit is contained in:
@@ -101,6 +101,34 @@ mod tests {
|
||||
assert!(html.contains("Rates are behind"));
|
||||
assert!(html.contains("unhealthy"));
|
||||
assert!(html.contains("3 publication days are missing"));
|
||||
assert!(html.contains("3 publication days behind"));
|
||||
}
|
||||
|
||||
/// Timestamps arrive as RFC 3339 instants and must not reach the page that
|
||||
/// way; how long a batch took has to be worked out here, since the backend
|
||||
/// only sends the two ends.
|
||||
#[test]
|
||||
fn timestamps_are_printed_rather_than_dumped() {
|
||||
let html = render_page(&healthy_page());
|
||||
|
||||
assert!(html.contains("2026-08-12 17:00 UTC"), "{html}");
|
||||
assert!(!html.contains("2026-08-12T17:00:00Z"), "{html}");
|
||||
// Started 17:00:00, finished 17:00:04.
|
||||
assert!(html.contains("17:00:04"));
|
||||
assert!(html.contains("4s"));
|
||||
}
|
||||
|
||||
/// The counts above the table are how a run of bad days is told apart from
|
||||
/// one bad day without reading every row.
|
||||
#[test]
|
||||
fn failed_attempts_are_counted_above_the_table() {
|
||||
let mut page = healthy_page();
|
||||
page.batches.push(batch(8, "failed"));
|
||||
page.batches.push(batch(7, "failed"));
|
||||
|
||||
let html = render_page(&page);
|
||||
|
||||
assert!(html.contains("2 failed"), "{html}");
|
||||
}
|
||||
|
||||
/// A pipeline that has never succeeded is a different problem from one
|
||||
|
||||
Reference in New Issue
Block a user