Test that a PipelineRefusal read as text names its variant and parts
Kills the one cargo-mutants survivor on eureka-pipeline (Display::fmt replaced by Ok(Default::default())). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b8bba0950a
commit
87b6455612
1 changed files with 12 additions and 0 deletions
|
|
@ -2772,6 +2772,18 @@ mod tests {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A refusal read as text names its variant and its parts, so an operator
|
||||||
|
/// who sees only the message (a log line, an `anyhow` chain) can tell which
|
||||||
|
/// field was refused and why.
|
||||||
|
#[test]
|
||||||
|
fn a_refusal_read_as_text_names_its_variant_and_parts() {
|
||||||
|
let text = PipelineRefusal::FieldBound { field: "title".into(), limit: 200, actual: 201 }.to_string();
|
||||||
|
assert!(text.starts_with("pipeline refusal: "), "{text}");
|
||||||
|
for part in ["FieldBound", "title", "200", "201"] {
|
||||||
|
assert!(text.contains(part), "{part} is missing from {text}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// The catalogue is exactly the files beside it: every entry's `path` is a
|
/// The catalogue is exactly the files beside it: every entry's `path` is a
|
||||||
/// schema file in the directory, and every schema file in the directory
|
/// schema file in the directory, and every schema file in the directory
|
||||||
/// has an entry, so a schema removed from the catalogue (or a file left
|
/// has an entry, so a schema removed from the catalogue (or a file left
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue