mirror of
https://github.com/openai/codex.git
synced 2026-09-11 20:36:49 +00:00
test(core,exec): align fork replay and resume expectations
This commit is contained in:
@@ -204,16 +204,12 @@ async fn record_initial_history_forked_materializes_fork_reference_rollout_items
|
||||
.record_initial_history(InitialHistory::Forked(rollout_items))
|
||||
.await;
|
||||
|
||||
let reconstruction_turn = session.new_default_turn().await;
|
||||
let mut expected = vec![user_message("first user"), assistant_message("first reply")];
|
||||
expected.extend(
|
||||
session
|
||||
.build_initial_context(reconstruction_turn.as_ref())
|
||||
.await,
|
||||
);
|
||||
|
||||
let history = session.state.lock().await.clone_history();
|
||||
assert_eq!(expected, history.raw_items());
|
||||
assert_eq!(
|
||||
vec![user_message("first user"), assistant_message("first reply")],
|
||||
history.raw_items()
|
||||
);
|
||||
assert!(session.reference_context_item().await.is_none());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
@@ -147,9 +147,9 @@ fn exec_resume_last_appends_to_existing_file() -> anyhow::Result<()> {
|
||||
.arg("--skip-git-repo-check")
|
||||
.arg("-C")
|
||||
.arg(&repo_root)
|
||||
.arg(&prompt2)
|
||||
.arg("resume")
|
||||
.arg("--last")
|
||||
.arg(&prompt2)
|
||||
.assert()
|
||||
.success();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user