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

Function fixture

atomic-cli/tests/it/routing_parity_test.rs:40–51  ·  view source on GitHub ↗

A fresh repo + vault with an isolated HOME carrying a default identity (the attestation flow needs one).

(label: &str)

Source from the content-addressed store, hash-verified

38/// A fresh repo + vault with an isolated HOME carrying a default identity
39/// (the attestation flow needs one).
40fn fixture(label: &str) -> (TempDir, TempDir) {
41 let repo_tmp = TempDir::new().unwrap();
42 let home_tmp = TempDir::new().unwrap();
43 let init = atomic(repo_tmp.path(), home_tmp.path(), &["init", "--vault"]);
44 assert!(
45 init.status.success(),
46 "{label}: init failed: {}",
47 String::from_utf8_lossy(&init.stderr)
48 );
49 let _ = label;
50 (repo_tmp, home_tmp)
51}
52
53fn file_iri(repo_dir: &Path, home_dir: &Path, path: &str) -> String {
54 let identity = run(repo_dir, home_dir, &["repo", "identity", "show", "--json"]);

Calls 3

atomicFunction · 0.70
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected