| 229 | |
| 230 | #[test] |
| 231 | fn node_names_are_unprefixed() { |
| 232 | let mut sharded = ShardedCsrIndex::new(); |
| 233 | sharded |
| 234 | .get_or_create(tid(42)) |
| 235 | .add_edge("alice", "knows", "bob") |
| 236 | .unwrap(); |
| 237 | sharded |
| 238 | .get_or_create(tid(42)) |
| 239 | .compact() |
| 240 | .expect("no governor, cannot fail"); |
| 241 | |
| 242 | let part = sharded.partition(tid(42)).unwrap(); |
| 243 | let alice_id = part.node_id("alice").expect("alice must be present"); |
| 244 | // The stored name is exactly what the caller inserted — never |
| 245 | // `"42:alice"`. Structural partitioning keeps shard ids out of |
| 246 | // user-visible keys. |
| 247 | assert_eq!(part.node_name(alice_id), "alice"); |
| 248 | } |
| 249 | |
| 250 | #[test] |
| 251 | fn drop_partition_removes_tenant_state() { |