tests: submit websocket turns with permission profiles

This commit is contained in:
Michael Bolin
2026-04-30 03:08:22 -07:00
parent 4f646e0aca
commit 0fc2a7b068
2 changed files with 12 additions and 45 deletions

View File

@@ -38,8 +38,11 @@ async fn websocket_test_codex_shell_chain() -> Result<()> {
let mut builder = test_codex().with_windows_cmd_shell();
let test = builder.build_with_websocket_server(&server).await?;
test.submit_turn_with_policy("run the echo command", test.config.legacy_sandbox_policy())
.await?;
test.submit_turn_with_permission_profile(
"run the echo command",
test.config.permissions.permission_profile(),
)
.await?;
let connection = server.single_connection();
assert_eq!(connection.len(), 2);
@@ -82,7 +85,7 @@ async fn websocket_first_turn_uses_startup_prewarm_and_create() -> Result<()> {
let mut builder = test_codex();
let test = builder.build_with_websocket_server(&server).await?;
test.submit_turn_with_policy("hello", test.config.legacy_sandbox_policy())
test.submit_turn_with_permission_profile("hello", test.config.permissions.permission_profile())
.await?;
assert_eq!(server.handshakes().len(), 1);
@@ -129,7 +132,7 @@ async fn websocket_first_turn_handles_handshake_delay_with_startup_prewarm() ->
let mut builder = test_codex();
let test = builder.build_with_websocket_server(&server).await?;
test.submit_turn_with_policy("hello", test.config.legacy_sandbox_policy())
test.submit_turn_with_permission_profile("hello", test.config.permissions.permission_profile())
.await?;
assert_eq!(server.handshakes().len(), 1);
@@ -182,8 +185,11 @@ async fn websocket_v2_test_codex_shell_chain() -> Result<()> {
});
let test = builder.build_with_websocket_server(&server).await?;
test.submit_turn_with_policy("run the echo command", test.config.legacy_sandbox_policy())
.await?;
test.submit_turn_with_permission_profile(
"run the echo command",
test.config.permissions.permission_profile(),
)
.await?;
let connection = server.single_connection();
assert_eq!(connection.len(), 3);