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

Function fixture

atomic-cli/tests/it/unrecord_integration_test.rs:43–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41}
42
43fn fixture() -> (TempDir, Vec<Hash>) {
44 let dir = TempDir::new().unwrap();
45 let repo = Repository::init(dir.path()).unwrap();
46 let mut hashes = Vec::new();
47 for name in ["a.txt", "b.txt", "c.txt"] {
48 fs::write(dir.path().join(name), name).unwrap();
49 repo.add(
50 repo.require_working_copy_id().unwrap(),
51 name,
52 Default::default(),
53 )
54 .unwrap();
55 hashes.push(record(&repo, name));
56 }
57 (dir, hashes)
58}
59
60fn history(repo: &Repository) -> Vec<Hash> {
61 repo.log(HistoryOptions::default().include_inherited(true))

Calls 8

initFunction · 0.70
writeFunction · 0.70
recordFunction · 0.70
unwrapMethod · 0.45
pathMethod · 0.45
addMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected