fix(anatomy): R5.4 report guard as an allowlist (report_guard.rs), sweep of 762 probes incl. seeded random strings, NUL refused in field segments
This commit is contained in:
1 parent
077d91bdff
commit
124d954a0d
10 files changed
+246
-195
No files matched your search
@@ -27,8 +27,8 @@ use faunosteo_core::curation::legacy::types::Anomaly;
|
||||
use faunosteo_core::curation::legacy::{
|
||||
EquineLegacyInput, HEAD_VIEW_ID, ImportResult, SvgSource, import_equine_legacy,
|
||||
};
|
||||
use faunosteo_core::curation::markdown::format_markdown;
|
||||
use faunosteo_core::curation::prettier_json::format_json;
|
||||
use faunosteo_core::curation::report_guard::format_report;
|
||||
use faunosteo_core::domain::sheet::AnatomicalSheetDocument;
|
||||
use faunosteo_core::json::to_js_compact;
|
||||
use serde_json::{Map, Value};
|
||||
@@ -174,7 +174,7 @@ fn the_raw_reports_are_the_texts_prettier_received() {
|
||||
row["before_prettier_sha256"],
|
||||
"{file} raw"
|
||||
);
|
||||
let formatted = format_markdown(&raw).unwrap();
|
||||
let formatted = format_report(&raw).unwrap();
|
||||
assert_eq!(
|
||||
sha256_hex(formatted.as_bytes()),
|
||||
row["sha256"],
|
||||
@@ -326,8 +326,8 @@ fn render_case(frozen: &Value, case: &Value) -> Rendered {
|
||||
drawings.insert(format!("app-{}", view.id()), Value::from(app));
|
||||
}
|
||||
Rendered {
|
||||
changelog: format_markdown(&changelog_raw),
|
||||
review: format_markdown(&review_raw),
|
||||
changelog: format_report(&changelog_raw),
|
||||
review: format_report(&review_raw),
|
||||
changelog_raw,
|
||||
review_raw,
|
||||
drawings,
|
||||
@@ -355,7 +355,10 @@ fn the_synthetic_review_cases_match_the_typescript_or_are_refused_as_declared()
|
||||
if DECLARED_REFUSALS.contains(&name) {
|
||||
let refused = rendered.changelog.unwrap_err();
|
||||
assert!(
|
||||
matches!(refused, PipelineError::UnsupportedWidth(_)),
|
||||
matches!(
|
||||
refused,
|
||||
PipelineError::UnsupportedWidth(_) | PipelineError::UnsupportedMarkdown(_)
|
||||
),
|
||||
"{name}"
|
||||
);
|
||||
continue;
|
||||
|
||||
Reference in new issue
Block a user