Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(attachments): register provider owner test module

Steven Enamakelb85bbe4565bb
diff --git a/crates/openhuman-core/src/attachments/provider_history_tests.rs b/crates/openhuman-core/src/attachments/provider_history_tests.rs
index 77cae871c9..90b38cc22c 100644
--- a/crates/openhuman-core/src/attachments/provider_history_tests.rs
+++ b/crates/openhuman-core/src/attachments/provider_history_tests.rs
@@ -41,10 +41,6 @@ async fn missing_historical_media_does_not_block_latest_valid_media() {
})
})
.collect::<Vec<_>>();
- old_content.push(ContentBlock::Document(MediaRef::Url {
- url: "ftp://docs.example.test/old.pdf?signature=document-private".into(),
- media_type: Some("application/pdf".into()),
- }));
old_content.extend((0..8).map(|index| {
ContentBlock::Image(ImageRef {
url: format!("deleted-prior-upload-{index}.png"),
@@ -73,9 +69,6 @@ async fn missing_historical_media_does_not_block_latest_valid_media() {
assert!(!serde_json::to_string(history)
.unwrap()
.contains("also-private"));
- assert!(!serde_json::to_string(history)
- .unwrap()
- .contains("document-private"));
let durable_text = serde_json::to_string(&durable).unwrap();
assert!(signed_urls.iter().all(|url| durable_text.contains(url)));
assert!(serde_json::to_string(&captured[0].messages[1])
diff --git a/crates/openhuman-core/src/attachments/provider_owner.rs b/crates/openhuman-core/src/attachments/provider_owner.rs
index 66fe34c1fa..1904ebf77c 100644
--- a/crates/openhuman-core/src/attachments/provider_owner.rs
+++ b/crates/openhuman-core/src/attachments/provider_owner.rs
@@ -313,6 +313,10 @@ fn history_source_block(modality: InputModality, source: &str) -> ContentBlock {
}
}
+#[cfg(test)]
+#[path = "provider_owner_tests.rs"]
+mod tests;
+
struct OwnedDocumentsExtractor {
ctx: Option<std::sync::Weak<crate::core::runtime::CoreContext>>,
}