mirror of
https://github.com/openai/codex.git
synced 2026-09-17 12:23:33 +00:00
Clarify MDM security requirements errors
This commit is contained in:
@@ -235,7 +235,7 @@ fn parse_managed_requirements_base64(encoded: &str) -> io::Result<ConfigRequirem
|
||||
{
|
||||
return Err(io::Error::new(
|
||||
io::ErrorKind::InvalidData,
|
||||
format!("Error parsing managed requirements from {source}: {dropped_entry}"),
|
||||
format!("Error parsing managed security controls from {source}: {dropped_entry}"),
|
||||
));
|
||||
}
|
||||
for dropped_entry in &sanitized.dropped_entries {
|
||||
|
||||
@@ -534,7 +534,7 @@ async fn managed_preferences_ignore_invalid_payload() -> anyhow::Result<()> {
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[tokio::test]
|
||||
async fn managed_preferences_invalid_requirements_fail_closed() -> anyhow::Result<()> {
|
||||
async fn managed_preferences_invalid_security_requirements_fail_closed() -> anyhow::Result<()> {
|
||||
use base64::Engine;
|
||||
|
||||
for (payload, expected_fragment) in [
|
||||
@@ -566,11 +566,11 @@ async fn managed_preferences_invalid_requirements_fail_closed() -> anyhow::Resul
|
||||
CloudRequirementsLoader::default(),
|
||||
)
|
||||
.await
|
||||
.expect_err("invalid managed requirements should fail closed");
|
||||
.expect_err("invalid managed security requirements should fail closed");
|
||||
|
||||
assert_eq!(err.kind(), std::io::ErrorKind::InvalidData);
|
||||
let message = err.to_string();
|
||||
assert!(message.contains("Error parsing managed requirements from MDM"));
|
||||
assert!(message.contains("Error parsing managed security controls from MDM"));
|
||||
assert!(message.contains(expected_fragment), "{message}");
|
||||
assert!(message.contains("bogus"), "{message}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user