Skip to content

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

style: reformat long test assertions to satisfy line width

Steven Enamakelb2f387989d17
diff --git a/crates/openhuman-core/src/core/runtime/saas_tests.rs b/crates/openhuman-core/src/core/runtime/saas_tests.rs
index 6356d75d7a..0ef48533d0 100644
--- a/crates/openhuman-core/src/core/runtime/saas_tests.rs
+++ b/crates/openhuman-core/src/core/runtime/saas_tests.rs
@@ -241,14 +241,18 @@ fn debug_output_redacts_the_storage_url() {
let mut config = SaasConfig::new("/srv/oh");
config.storage_url = Some("mongodb://admin:[email protected]/oh".into());
let shown = format!("{config:?}");
- assert!(!shown.contains("hunter2") && !shown.contains("db.internal"), "{shown}");
+ assert!(
+ !shown.contains("hunter2") && !shown.contains("db.internal"),
+ "{shown}"
+ );
assert!(shown.contains("<redacted>"));
assert!(!format!("{:?}", SaasConfig::new("/srv/oh")).contains("<redacted>"));
}
#[test]
fn reads_the_tool_iteration_cap() {
- let config: SaasConfig = toml::from_str("root = \"/srv/oh\"\nmax_tool_iterations = 4\n").unwrap();
+ let config: SaasConfig =
+ toml::from_str("root = \"/srv/oh\"\nmax_tool_iterations = 4\n").unwrap();
assert_eq!(config.max_tool_iterations, Some(4));
assert_eq!(SaasConfig::new("/srv/oh").max_tool_iterations, None);
}
diff --git a/crates/openhuman-core/src/profiles/tools_tests.rs b/crates/openhuman-core/src/profiles/tools_tests.rs
index 465bb79bf8..644d8aa601 100644
--- a/crates/openhuman-core/src/profiles/tools_tests.rs
+++ b/crates/openhuman-core/src/profiles/tools_tests.rs
@@ -187,9 +187,15 @@ fn a_missing_sandbox_is_refused() {
#[test]
fn only_the_scheduler_and_clock_tools_are_operator_admittable() {
- assert_eq!(OPERATOR_ADMITTABLE, ["cron", "current_time", "resolve_time"]);
+ assert_eq!(
+ OPERATOR_ADMITTABLE,
+ ["cron", "current_time", "resolve_time"]
+ );
for tool in OPERATOR_ADMITTABLE {
assert!(!is_hard_denied(tool), "{tool}");
- assert!(!admits_with(tool, false, &[]), "{tool} stays off without a scope");
+ assert!(
+ !admits_with(tool, false, &[]),
+ "{tool} stays off without a scope"
+ );
}
}