Skip to content

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

test(app): delete two tests that proved nothing

M3gA-Mind7e97efe1da4d
diff --git a/crates/openhuman-app/src/core_process_tests.rs b/crates/openhuman-app/src/core_process_tests.rs
index 53ee161336..93329da495 100644
--- a/crates/openhuman-app/src/core_process_tests.rs
+++ b/crates/openhuman-app/src/core_process_tests.rs
@@ -845,38 +845,3 @@ fn recover_port_conflict_succeeds_when_port_is_free() {
"new_port should be set on success"
);
}
-
-#[test]
-fn recover_port_conflict_handles_stale_listener() {
- let _env_lock = env_lock();
- let _unset = EnvGuard::unset("OPENHUMAN_CORE_REUSE_EXISTING");
- let _workspace = test_workspace();
- let rt = core_test_runtime();
-
- // Bind a port, attempt recovery — the recovery must still succeed because
- // ensure_running's fallback range kicks in when the preferred port is busy.
- let outcome = rt.block_on(async {
- let listener = tokio::net::TcpListener::bind("127.0.0.1:0")
- .await
- .expect("bind");
- let port = listener.local_addr().expect("addr").port();
-
- let handle = CoreProcessHandle::new(port);
- let outcome = handle.recover_port_conflict().await;
- handle.shutdown().await;
- drop(listener);
- outcome
- });
-
- // Recovery may succeed via port fallback even with the listener held.
- // We only assert that the outcome is well-formed.
- assert!(
- !outcome.message.is_empty(),
- "outcome message must always be populated"
- );
- if outcome.success {
- assert!(outcome.new_port.is_some());
- } else {
- assert!(outcome.new_port.is_none());
- }
-}
diff --git a/crates/openhuman-app/src/session/commands.rs b/crates/openhuman-app/src/session/commands.rs
index da91b81653..cd5fffed3a 100644
--- a/crates/openhuman-app/src/session/commands.rs
+++ b/crates/openhuman-app/src/session/commands.rs
@@ -68,7 +68,3 @@ pub(crate) async fn auth_current_user(
.await
.map_err(err)
}
-
-#[cfg(test)]
-#[path = "commands_tests.rs"]
-mod tests;
diff --git a/crates/openhuman-app/src/session/commands_tests.rs b/crates/openhuman-app/src/session/commands_tests.rs
deleted file mode 100644
index 3da6ab2539..0000000000
--- a/crates/openhuman-app/src/session/commands_tests.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-#[test]
-fn session_commands_are_allowed_by_the_main_window_capability() {
- let capability = include_str!("../../permissions/allow-core-process.toml");
-
- for command in [
- "auth_login_with_token",
- "auth_store_session",
- "auth_logout",
- "auth_state",
- "auth_current_user",
- ] {
- assert!(
- capability.contains(&format!("\"{command}\"")),
- "session command {command} is missing from allow-core-process.toml"
- );
- }
-}