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

Function record

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

Source from the content-addressed store, hash-verified

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