()
| 251 | |
| 252 | #[test] |
| 253 | fn test_embedding_crud() { |
| 254 | let dir = tempdir().unwrap(); |
| 255 | let pristine = Pristine::open(dir.path().join("db")).unwrap(); |
| 256 | let mut txn = pristine.write_txn().unwrap(); |
| 257 | txn.init_embeddings().unwrap(); |
| 258 | |
| 259 | let record = make_record(384, 0); |
| 260 | txn.put_embedding("memory/arch.md", 0, &record).unwrap(); |
| 261 | |
| 262 | let retrieved = txn.get_embedding("memory/arch.md", 0).unwrap().unwrap(); |
| 263 | assert_eq!(retrieved.vector.len(), 384); |
| 264 | assert_eq!(retrieved.preview, "chunk 0"); |
| 265 | |
| 266 | assert!(txn.get_embedding("nonexistent", 0).unwrap().is_none()); |
| 267 | txn.commit().unwrap(); |
| 268 | } |
| 269 | |
| 270 | #[test] |
| 271 | fn test_embedding_list_chunks() { |
nothing calls this directly
no test coverage detected