Fix Bazel test configuration for platform-specific data (#35067)

## What changed

- Include CLI snapshot files in Bazel test runfiles.
- Restrict the Windows sandbox binary test target to Windows.
- Label boolean and optional arguments in the affected CLI tests.

GitOrigin-RevId: c248396c51d881c38856739d7d9b653dcde1823e
This commit is contained in:
Adam Perry @ OpenAI authored and copyberry committed 2026-07-24 01:34:56 +00:00
1 parent 3947f0d0c3
commit f47f28cd0d
4 files changed
+21 -10

No files matched your search

+16 -8
View File
@@ -673,17 +673,22 @@ mod tests {
#[test]
fn remote_control_pairing_human_output_labels_the_manual_code() {
assert_eq!(
format_remote_control_pairing_output(&pairing_response(Some("ABCD-EFGH")), false)
.expect("manual pairing output"),
format_remote_control_pairing_output(
&pairing_response(Some("ABCD-EFGH")),
/*json*/ false,
)
.expect("manual pairing output"),
"Pairing code: ABCD-EFGH"
);
}
#[test]
fn remote_control_pairing_json_output_preserves_pairing_artifacts() {
let output =
format_remote_control_pairing_output(&pairing_response(Some("ABCD-EFGH")), true)
.expect("pairing JSON output");
let output = format_remote_control_pairing_output(
&pairing_response(Some("ABCD-EFGH")),
/*json*/ true,
)
.expect("pairing JSON output");
assert_eq!(
serde_json::from_str::<serde_json::Value>(&output).expect("valid JSON"),
json!({
@@ -698,9 +703,12 @@ mod tests {
#[test]
fn remote_control_pairing_human_output_requires_manual_code() {
assert_eq!(
format_remote_control_pairing_output(&pairing_response(None), false)
.expect_err("missing manual pairing code should fail")
.to_string(),
format_remote_control_pairing_output(
&pairing_response(/*manual_pairing_code*/ None),
/*json*/ false,
)
.expect_err("missing manual pairing code should fail")
.to_string(),
"remote-control pairing response did not include a manual pairing code"
);
}