Use default timeouts in cyber exec policy tests (#39496)

## What changed

Stop setting explicit one-second `timeout_ms` and `yield_time_ms` values in the
mock command calls. The shell command and unified exec variants now use their
default timing behavior while testing cyber exec policy.

GitOrigin-RevId: b1c25304ca47e7b08f023fe678467fc00330158b
This commit is contained in:
jif
2026-08-19 15:08:32 +00:00
committed by copyberry
parent 94a831d9dd
commit af70018080

View File

@@ -91,9 +91,9 @@ fn configure_saved_prefix_and_guardian(config: &mut Config) {
}
fn command_response(response_id: &str, call_id: &str, command_tool: CommandTool) -> Result<String> {
let (tool_name, command_key, timeout_key) = match command_tool {
CommandTool::ShellCommand => ("shell_command", "command", "timeout_ms"),
CommandTool::UnifiedExec => ("exec_command", "cmd", "yield_time_ms"),
let (tool_name, command_key) = match command_tool {
CommandTool::ShellCommand => ("shell_command", "command"),
CommandTool::UnifiedExec => ("exec_command", "cmd"),
};
let mut args = json!({
"sandbox_permissions": SandboxPermissions::RequireEscalated,
@@ -101,8 +101,6 @@ fn command_response(response_id: &str, call_id: &str, command_tool: CommandTool)
"prefix_rule": ["git", "version"],
});
args[command_key] = json!(TEST_COMMAND);
args[timeout_key] = json!(1_000);
Ok(sse(vec![
ev_response_created(response_id),
ev_function_call(call_id, tool_name, &serde_json::to_string(&args)?),