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

Function record

libatomic/tests/local_sync_test.rs:237–259  ·  view source on GitHub ↗
(service: &LocalService, repository: &proto::RepositoryRef, message: &str)

Source from the content-addressed store, hash-verified

235}
236
237async fn record(service: &LocalService, repository: &proto::RepositoryRef, message: &str) -> Hash {
238 let response: proto::RecordResponse = invoke(
239 service,
240 "/atomic.RepositoryMutationService/Record",
241 &proto::RecordRequest {
242 repository: Some(repository.clone()),
243 message: message.into(),
244 paths: vec!["hello.txt".into()],
245 ..Default::default()
246 },
247 )
248 .await;
249 atomic_core::types::Merkle(
250 response
251 .change
252 .unwrap()
253 .hash
254 .unwrap()
255 .value
256 .try_into()
257 .unwrap(),
258 )
259}
260
261// This binary has one test, so its temporary process-global identity/config
262// environment cannot race another test in this binary.

Calls 4

MerkleClass · 0.85
invokeFunction · 0.70
cloneMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected