test: make Windows CI fixtures drive-independent

Co-authored-by: Codex noreply@openai.com
This commit is contained in:
viyatb-oai
2026-07-08 15:12:37 -07:00
co-authored by Codex noreply@openai.com
parent 4d91924328
commit 0ce1aa49cd
2 changed files with 7 additions and 2 deletions
+3 -2
View File
@@ -9,6 +9,7 @@ use codex_protocol::protocol::SessionSource;
use codex_protocol::protocol::TokenCountEvent;
use codex_protocol::protocol::TokenUsage;
use codex_protocol::protocol::TokenUsageInfo;
use core_test_support::test_path_buf;
use serde_json::json;
use std::fs;
use std::fs::FileTimes;
@@ -189,7 +190,7 @@ fn create_fake_rollout_with_source_and_parent_thread_id(
forked_from_id: None,
parent_thread_id,
timestamp: meta_rfc3339.to_string(),
cwd: PathBuf::from("/"),
cwd: test_path_buf("/"),
originator: "codex".to_string(),
cli_version: "0.0.0".to_string(),
source,
@@ -279,7 +280,7 @@ pub fn create_fake_rollout_with_text_elements(
forked_from_id: None,
parent_thread_id: None,
timestamp: meta_rfc3339.to_string(),
cwd: PathBuf::from("/"),
cwd: test_path_buf("/"),
originator: "codex".to_string(),
cli_version: "0.0.0".to_string(),
source: SessionSource::Cli,
@@ -404,6 +404,10 @@ mod tests {
]),
)
.expect("update session");
set_modified_at(
&session_path,
SystemTime::now() + Duration::from_secs(/*secs*/ 1),
);
let sessions = detect_recent_sessions(&external_agent_home, root.path()).expect("detect");
assert_eq!(