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

Function sample_pack

atomic-objects/src/sync.rs:347–367  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

345 use super::*;
346
347 fn sample_pack() -> SyncPack {
348 SyncPack {
349 objects: vec![
350 ObjectRecord::new(ObjectFamily::Change, "aa", b"change-body".to_vec()),
351 ObjectRecord::new(ObjectFamily::View, "bb", b"{\"scope\":\"shared\"}".to_vec()),
352 ObjectRecord::new(ObjectFamily::Provenance, "cc", b"prov".to_vec()),
353 ],
354 refs: vec![
355 RefRecord {
356 name: "dev".to_string(),
357 expect_old: None,
358 new_target: "bb".to_string(),
359 },
360 RefRecord {
361 name: "feature".to_string(),
362 expect_old: Some("bb".to_string()),
363 new_target: "cc".to_string(),
364 },
365 ],
366 }
367 }
368
369 #[test]
370 fn pack_roundtrips_through_the_wire() {

Callers 1

Calls

no outgoing calls

Tested by 1