The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(document,presentation): remove redundant validation tests and isolate image cap test
Steven Enamakel49d7b9686a7e
diff --git a/crates/openhuman-core/src/tools/impl/document/document_tests.rs b/crates/openhuman-core/src/tools/impl/document/document_tests.rsindex 8feff6697c..bac6018e95 100644--- a/crates/openhuman-core/src/tools/impl/document/document_tests.rs+++ b/crates/openhuman-core/src/tools/impl/document/document_tests.rs@@ -94,50 +94,9 @@ fn description_includes_router_rules() {assert!(desc.contains("document") || desc.contains("docx"));}-#[tokio::test]-async fn execute_rejects_empty_title() {- let ws = workspace();- let tool = make_tool(ws.path());- let args = json!({ "title": "", "sections": [{ "heading": "x", "paragraphs": ["y"] }] });- let result = tool.execute(args).await.expect("execute returns Ok");- assert!(result.is_error);- assert!(result.text().contains("title"));-}-#[tokio::test]-async fn execute_rejects_empty_sections_array() {- let ws = workspace();- let tool = make_tool(ws.path());- let args = json!({ "title": "Doc", "sections": [] });- let result = tool.execute(args).await.expect("execute returns Ok");- assert!(result.is_error);- assert!(result.text().contains("section"));-}-#[tokio::test]-async fn execute_rejects_section_with_no_content() {- let ws = workspace();- let tool = make_tool(ws.path());- let args = json!({- "title": "Doc",- "sections": [{ "heading": "", "paragraphs": [" "], "bullets": [] }]- });- let result = tool.execute(args).await.expect("execute returns Ok");- assert!(result.is_error);-}-#[tokio::test]-async fn execute_rejects_oversize_heading() {- let ws = workspace();- let tool = make_tool(ws.path());- let big = "x".repeat(MAX_TEXT_CHARS + 1);- let args = json!({- "title": "Doc",- "sections": [{ "heading": big, "paragraphs": ["ok"] }]- });- let result = tool.execute(args).await.expect("execute returns Ok");- assert!(result.is_error);-}#[tokio::test]async fn execute_rejects_too_many_sections() {diff --git a/crates/openhuman-core/src/tools/impl/document/types_tests.rs b/crates/openhuman-core/src/tools/impl/document/types_tests.rsindex ae2d192601..d69420e481 100644--- a/crates/openhuman-core/src/tools/impl/document/types_tests.rs+++ b/crates/openhuman-core/src/tools/impl/document/types_tests.rs@@ -19,10 +19,6 @@ fn base() -> GenerateDocumentInput {}}-#[test]-fn accepts_a_well_formed_input() {- assert!(validate_input(&base()).is_ok());-}#[test]fn tinydocs_invalid_input_keeps_its_field_and_reason() {diff --git a/crates/openhuman-core/src/tools/impl/presentation/presentation_tests.rs b/crates/openhuman-core/src/tools/impl/presentation/presentation_tests.rsindex fe2eb091fc..ea46c4c39e 100644--- a/crates/openhuman-core/src/tools/impl/presentation/presentation_tests.rs+++ b/crates/openhuman-core/src/tools/impl/presentation/presentation_tests.rs@@ -452,8 +452,17 @@ async fn execute_skips_missing_artifact_with_warning() {#[tokio::test]async fn execute_rejects_too_many_images_per_deck() {+ if crate::util::module_test_process::run(+ module_path!(),+ "execute_rejects_too_many_images_per_deck",+ ) {+ return;+ }let ws = workspace();- let tool = make_tool(ws.path());+ let mut config = crate::config::Config::default();+ config.workspace_dir = ws.path().to_path_buf();+ config.modules.allow_download = false;+ let tool = make_tool_with_config(ws.path(), config);let image_path = ws.path().join("one.png");std::fs::write(&image_path, png_1x1()).expect("write valid image");// Nine successfully resolved images exceed the bus deck cap of eight.