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:
jif
2026-11-03 11:43:00 +00:00
committed by copyberry
parent d39349009a
commit fc39cfcacd
2 changed files with 3 additions and 3 deletions
@@ -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?;