| 6 | use serde_json::{json, Map, Value}; |
| 7 | |
| 8 | async fn resolve(service: &LocalService, root: &std::path::Path) -> proto::RepositoryRef { |
| 9 | let bytes = service |
| 10 | .call( |
| 11 | "/atomic.DaemonService/ResolveRepository", |
| 12 | &proto::ResolveRepositoryRequest { |
| 13 | path: root.display().to_string(), |
| 14 | } |
| 15 | .encode_to_vec(), |
| 16 | ) |
| 17 | .await |
| 18 | .unwrap(); |
| 19 | proto::ResolveRepositoryResponse::decode(bytes.as_slice()) |
| 20 | .unwrap() |
| 21 | .repository |
| 22 | .unwrap() |
| 23 | } |
| 24 | |
| 25 | #[tokio::test] |
| 26 | async fn memory_create_honors_explicit_identity_and_status_without_overwriting() { |