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

Function sample_pack

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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by 1