MCPcopy Create free account
hub / github.com/douglance/devsql / test_codex_history_alias_queries_same_data

Function test_codex_history_alias_queries_same_data

crates/ccql/src/sql/mod.rs:350–374  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

348
349 #[tokio::test]
350 async fn test_codex_history_alias_queries_same_data() {
351 let claude_dir = tempdir().expect("claude temp dir");
352 let codex_dir = tempdir().expect("codex temp dir");
353
354 std::fs::write(
355 codex_dir.path().join("history.jsonl"),
356 r#"{"session_id":"s1","ts":1700000000,"text":"prompt"}"#,
357 )
358 .expect("write jhistory");
359
360 let config = Config::new_with_codex_data_dir(
361 claude_dir.path().to_path_buf(),
362 codex_dir.path().to_path_buf(),
363 )
364 .expect("config");
365
366 let mut engine = SqlEngine::new(config, SqlOptions::default()).expect("engine");
367
368 let rows = engine
369 .execute("SELECT COUNT(*) AS n FROM codex_history")
370 .await
371 .expect("query");
372
373 assert_eq!(rows[0]["n"], serde_json::json!(1));
374 }
375}

Callers

nothing calls this directly

Calls 3

pathMethod · 0.80
writeFunction · 0.70
executeMethod · 0.45

Tested by

no test coverage detected