Create a repo+vault and a single memory via the GENERIC vault path.
()
| 302 | |
| 303 | /// Create a repo+vault and a single memory via the GENERIC vault path. |
| 304 | fn repo_with_memory() -> (Repository, String, MemLiftInputs, tempfile::TempDir) { |
| 305 | let dir = tempdir().unwrap(); |
| 306 | let repo = Repository::init(dir.path()).unwrap(); |
| 307 | repo.init_vault().unwrap(); |
| 308 | let inputs = memory_inputs(); |
| 309 | let id = "01j8zc4r8t".to_string(); |
| 310 | let path = normalize_memory_path(&id); |
| 311 | repo.vault_store( |
| 312 | &path, |
| 313 | VaultEntryType::Memory, |
| 314 | inputs.body.clone().into_bytes(), |
| 315 | serde_json::to_string(&inputs.frontmatter).unwrap(), |
| 316 | ) |
| 317 | .unwrap(); |
| 318 | (repo, id, inputs, dir) |
| 319 | } |
| 320 | |
| 321 | /// Mirror `attest`'s tracked-vault write exactly. |
| 322 | fn write_tracked(repo: &Repository, id: &str, node: &MemoryNode, inputs: &MemLiftInputs) { |