MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / resolve

Function resolve

libatomic/tests/vault_local_test.rs:8–23  ·  view source on GitHub ↗
(service: &LocalService, root: &std::path::Path)

Source from the content-addressed store, hash-verified

6use serde_json::{json, Map, Value};
7
8async 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]
26async fn memory_create_honors_explicit_identity_and_status_without_overwriting() {

Calls 5

displayMethod · 0.80
decodeFunction · 0.50
unwrapMethod · 0.45
callMethod · 0.45
as_sliceMethod · 0.45

Tested by

no test coverage detected