mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
fix: use expected line ending in codex-rs/core/config.schema.json (#10977)
Fixes a line ending that was altered in https://github.com/openai/codex/pull/10861. This is breaking the release due to:a118494323/.github/workflows/rust-release.yml (L54-L55)This PR updates the test to check for this so we should catch it in CI (or when running tests locally):a118494323/codex-rs/core/src/config/schema.rs (L105-L131)
This commit is contained in:
@@ -1629,4 +1629,4 @@
|
||||
},
|
||||
"title": "ConfigToml",
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
@@ -99,8 +99,11 @@ pub fn write_config_schema(out_path: &Path) -> anyhow::Result<()> {
|
||||
mod tests {
|
||||
use super::canonicalize;
|
||||
use super::config_schema_json;
|
||||
use super::write_config_schema;
|
||||
|
||||
use pretty_assertions::assert_eq;
|
||||
use similar::TextDiff;
|
||||
use tempfile::TempDir;
|
||||
|
||||
#[test]
|
||||
fn config_schema_matches_fixture() {
|
||||
@@ -128,5 +131,16 @@ mod tests {
|
||||
Run `just write-config-schema` to overwrite with your changes.\n\n{diff}"
|
||||
);
|
||||
}
|
||||
|
||||
// Make sure the version in the repo matches exactly: https://github.com/openai/codex/pull/10977.
|
||||
let tmp = TempDir::new().expect("create temp dir");
|
||||
let tmp_path = tmp.path().join("config.schema.json");
|
||||
write_config_schema(&tmp_path).expect("write config schema to temp path");
|
||||
let tmp_contents =
|
||||
std::fs::read_to_string(&tmp_path).expect("read back config schema from temp path");
|
||||
assert_eq!(
|
||||
fixture, tmp_contents,
|
||||
"fixture should match exactly with generated schema"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user