mirror of
https://github.com/openai/codex.git
synced 2026-10-24 18:18:41 +00:00
Merge d958f52151 into sapling-pr-archive-bolinfest
This commit is contained in:
@@ -5,6 +5,7 @@ use codex_app_server_protocol::JSONRPCResponse;
|
||||
use codex_app_server_protocol::MarketplaceAddParams;
|
||||
use codex_app_server_protocol::MarketplaceAddResponse;
|
||||
use codex_app_server_protocol::RequestId;
|
||||
use codex_utils_absolute_path::AbsolutePathBuf;
|
||||
use pretty_assertions::assert_eq;
|
||||
use tempfile::TempDir;
|
||||
use tokio::time::Duration;
|
||||
@@ -48,10 +49,10 @@ async fn marketplace_add_local_directory_source() -> Result<()> {
|
||||
installed_root,
|
||||
already_added,
|
||||
} = to_response(response)?;
|
||||
let expected_root = source.canonicalize()?;
|
||||
let expected_root = AbsolutePathBuf::from_absolute_path(source.canonicalize()?)?;
|
||||
|
||||
assert_eq!(marketplace_name, "debug");
|
||||
assert_eq!(installed_root.as_path(), expected_root.as_path());
|
||||
assert_eq!(installed_root, expected_root);
|
||||
assert!(!already_added);
|
||||
assert_eq!(
|
||||
std::fs::read_to_string(installed_root.as_path().join("plugins/sample/marker.txt"))?,
|
||||
|
||||
@@ -278,10 +278,9 @@ mod tests {
|
||||
let expected_source = source_root.path().canonicalize()?.display().to_string();
|
||||
assert_eq!(result.marketplace_name, "debug");
|
||||
assert_eq!(result.source_display, expected_source);
|
||||
assert_eq!(
|
||||
result.installed_root.as_path(),
|
||||
source_root.path().canonicalize()?
|
||||
);
|
||||
let expected_installed_root =
|
||||
AbsolutePathBuf::from_absolute_path(source_root.path().canonicalize()?)?;
|
||||
assert_eq!(result.installed_root, expected_installed_root);
|
||||
assert!(!result.already_added);
|
||||
assert!(
|
||||
!marketplace_install_root(codex_home.path())
|
||||
|
||||
Reference in New Issue
Block a user