Create a repo+vault and a single memory via the GENERIC vault path.
()
| 355 | |
| 356 | /// Create a repo+vault and a single memory via the GENERIC vault path. |
| 357 | fn repo_with_memory() -> (Repository, String, MemLiftInputs, tempfile::TempDir) { |
| 358 | let dir = tempdir().unwrap(); |
| 359 | let repo = Repository::init(dir.path()).unwrap(); |
| 360 | repo.init_vault().unwrap(); |
| 361 | let inputs = memory_inputs(); |
| 362 | let id = "01j8zc4r8t".to_string(); |
| 363 | let path = normalize_memory_path(&id); |
| 364 | repo.vault_store( |
| 365 | &path, |
| 366 | VaultEntryType::Memory, |
| 367 | inputs.body.clone().into_bytes(), |
| 368 | serde_json::to_string(&inputs.frontmatter).unwrap(), |
| 369 | ) |
| 370 | .unwrap(); |
| 371 | (repo, id, inputs, dir) |
| 372 | } |
| 373 | |
| 374 | /// Mirror `attest`'s tracked-vault write exactly. |
| 375 | fn write_tracked(repo: &Repository, id: &str, node: &MemoryNode, inputs: &MemLiftInputs) { |