mirror of
https://github.com/openai/codex.git
synced 2026-05-02 18:37:01 +00:00
core tests: migrate more turns to permission profiles (#20013)
## Summary - Migrate another batch of direct `Op::UserTurn` test construction from legacy `SandboxPolicy` values to `PermissionProfile` inputs via `turn_permission_fields()`. - Replace a one-off read-only `SandboxPolicy` bridge in the macOS exec test with `PermissionProfile::read_only()`. - Reduce `SandboxPolicy` references in `codex-rs/core/tests` from 32 files at the start of the cleanup stack to 27 files. ## Testing - `cargo check -p codex-core --tests` - `just fmt` - `just fix -p codex-core`
This commit is contained in:
@@ -9,7 +9,6 @@ use codex_protocol::config_types::WindowsSandboxLevel;
|
||||
use codex_protocol::error::Result;
|
||||
use codex_protocol::exec_output::ExecToolCallOutput;
|
||||
use codex_protocol::models::PermissionProfile;
|
||||
use codex_protocol::protocol::SandboxPolicy;
|
||||
use codex_sandboxing::SandboxType;
|
||||
use codex_sandboxing::get_platform_sandbox;
|
||||
use core_test_support::PathExt;
|
||||
@@ -50,12 +49,9 @@ where
|
||||
arg0: None,
|
||||
};
|
||||
|
||||
let policy = SandboxPolicy::new_read_only_policy();
|
||||
let permission_profile = PermissionProfile::from_legacy_sandbox_policy(&policy);
|
||||
|
||||
process_exec_tool_call(
|
||||
params,
|
||||
&permission_profile,
|
||||
&PermissionProfile::read_only(),
|
||||
&cwd,
|
||||
&None,
|
||||
/*use_legacy_landlock*/ false,
|
||||
|
||||
Reference in New Issue
Block a user