mirror of
https://github.com/openai/codex.git
synced 2026-11-03 00:21:31 +00:00
Fix config test on macOS (#11579)
When running these tests locally, you may have system-wide config or requirements files. This makes the tests ignore these files.
This commit is contained in:
1 parent
aeaa68347f
commit
d8b130d9a4
2 files changed
+23
-1
No files matched your search
@@ -903,6 +903,16 @@ remote_models = true
|
||||
},
|
||||
);
|
||||
let layers = response.layers.expect("layers present");
|
||||
// Local macOS machines can surface an MDM-managed config layer at the
|
||||
// top of the stack; ignore it so this test stays focused on file/user/system ordering.
|
||||
let layers = if matches!(
|
||||
layers.first().map(|layer| &layer.name),
|
||||
Some(ConfigLayerSource::LegacyManagedConfigTomlFromMdm)
|
||||
) {
|
||||
&layers[1..]
|
||||
} else {
|
||||
layers.as_slice()
|
||||
};
|
||||
assert_eq!(layers.len(), 3, "expected three layers");
|
||||
assert_eq!(
|
||||
layers.first().unwrap().name,
|
||||
@@ -1117,6 +1127,16 @@ remote_models = true
|
||||
},
|
||||
);
|
||||
let layers = response.layers.expect("layers");
|
||||
// Local macOS machines can surface an MDM-managed config layer at the
|
||||
// top of the stack; ignore it so this test stays focused on file/session/user ordering.
|
||||
let layers = if matches!(
|
||||
layers.first().map(|layer| &layer.name),
|
||||
Some(ConfigLayerSource::LegacyManagedConfigTomlFromMdm)
|
||||
) {
|
||||
&layers[1..]
|
||||
} else {
|
||||
layers.as_slice()
|
||||
};
|
||||
assert_eq!(
|
||||
layers.first().unwrap().name,
|
||||
ConfigLayerSource::LegacyManagedConfigTomlFromFile { file: managed_file }
|
||||
|
||||
Reference in new issue
Block a user