mirror of
https://github.com/openai/codex.git
synced 2026-11-05 20:10:33 +00:00
Add context to Guardian test setup failures (#59125)
Replace `unwrap()` with descriptive `expect()` messages when enabling denial reconsideration and setting the read-only permission profile in Guardian tests. GitOrigin-RevId: 9e5e32ac94889e063d5a721fa6fde8e5c871747d
This commit is contained in:
@@ -62,7 +62,7 @@ async fn cancelling_tool_aborts_its_guardian_review(
|
||||
config
|
||||
.features
|
||||
.enable(Feature::GuardianDenialReconsideration)
|
||||
.unwrap();
|
||||
.expect("enable Guardian denial reconsideration");
|
||||
}
|
||||
config
|
||||
.set_legacy_sandbox_policy(SandboxPolicy::new_workspace_write_policy())
|
||||
|
||||
@@ -64,7 +64,7 @@ async fn guardian_denial_reconsideration(
|
||||
config
|
||||
.permissions
|
||||
.set_permission_profile(PermissionProfile::read_only())
|
||||
.unwrap();
|
||||
.expect("set read-only permission profile");
|
||||
config.guardian_denial_reconsideration_prompt = prompt.map(str::to_owned);
|
||||
if second == Some(SecondPass::Timeout) {
|
||||
config.guardian_review_timeout = Some(Duration::from_secs(10));
|
||||
@@ -82,7 +82,7 @@ async fn guardian_denial_reconsideration(
|
||||
config
|
||||
.features
|
||||
.enable(Feature::GuardianDenialReconsideration)
|
||||
.unwrap();
|
||||
.expect("enable Guardian denial reconsideration");
|
||||
}
|
||||
});
|
||||
let harness = TestCodexHarness::with_auto_env_builder(builder).await?;
|
||||
|
||||
Reference in New Issue
Block a user