Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions codex-rs/core/tests/suite/apply_patch_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use codex_protocol::permissions::NetworkSandboxPolicy;
use codex_protocol::protocol::AskForApproval;
use codex_protocol::protocol::EventMsg;
use codex_protocol::protocol::Op;
use codex_protocol::protocol::SandboxPolicy;
use codex_protocol::user_input::UserInput;
#[cfg(target_os = "linux")]
use codex_sandboxing::landlock::CODEX_LINUX_SANDBOX_ARG0;
Expand All @@ -36,6 +35,7 @@ use core_test_support::skip_if_remote;
use core_test_support::test_codex::TestCodexBuilder;
use core_test_support::test_codex::TestCodexHarness;
use core_test_support::test_codex::test_codex;
use core_test_support::test_codex::turn_permission_fields;
use core_test_support::wait_for_event;
use core_test_support::wait_for_event_with_timeout;
use serde_json::json;
Expand Down Expand Up @@ -64,6 +64,8 @@ async fn apply_patch_harness_with(
async fn submit_without_wait(harness: &TestCodexHarness, prompt: &str) -> Result<()> {
let test = harness.test();
let session_model = test.session_configured.model.clone();
let (sandbox_policy, permission_profile) =
turn_permission_fields(PermissionProfile::Disabled, harness.cwd());
test.codex
.submit(Op::UserTurn {
environments: None,
Expand All @@ -75,8 +77,8 @@ async fn submit_without_wait(harness: &TestCodexHarness, prompt: &str) -> Result
cwd: harness.cwd().to_path_buf(),
approval_policy: AskForApproval::Never,
approvals_reviewer: None,
sandbox_policy: SandboxPolicy::DangerFullAccess,
permission_profile: None,
sandbox_policy,
permission_profile,
model: session_model,
effort: None,
summary: None,
Expand Down
4 changes: 2 additions & 2 deletions codex-rs/core/tests/suite/hooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1943,9 +1943,9 @@ print(json.dumps({{
fs::remove_file(&marker).context("remove leftover plugin pre tool use marker")?;
}

test.submit_turn_with_policy(
test.submit_turn_with_permission_profile(
"run the shell command blocked by a plugin hook",
codex_protocol::protocol::SandboxPolicy::DangerFullAccess,
PermissionProfile::Disabled,
)
.await?;

Expand Down
Loading