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

Function assert_parity

atomic-repository/tests/it/remote_cache_parity_test.rs:183–193  ·  view source on GitHub ↗
(pair: &Pair, view: &str, live: &BTreeMap<u64, String>, what: &str)

Source from the content-addressed store, hash-verified

181}
182
183fn assert_parity(pair: &Pair, view: &str, live: &BTreeMap<u64, String>, what: &str) {
184 pair.hydrate(view, live);
185 let h = header(what);
186 let host = change_bytes(&pair.host, h.clone());
187 let cache = change_bytes(&pair.cache, h);
188 assert_eq!(
189 host.0, cache.0,
190 "{what}: the cache records a different change"
191 );
192 assert_eq!(host.1, cache.1, "{what}: same hash, different bytes");
193}
194
195fn two_files(repo: &Repository) {
196 let root = repo.root().to_path_buf();

Calls 4

change_bytesFunction · 0.85
hydrateMethod · 0.80
headerFunction · 0.70
cloneMethod · 0.45

Tested by

no test coverage detected