()
| 150 | |
| 151 | #[test] |
| 152 | fn ceiling_enforcement() { |
| 153 | let store = CeilingStore::new(); |
| 154 | store.define(TenantCeiling { |
| 155 | tenant_id: 1, |
| 156 | max_collections: 10, |
| 157 | max_storage_bytes: 1024 * 1024 * 1024, |
| 158 | audit_min_retention_days: 365, |
| 159 | }); |
| 160 | |
| 161 | assert!(store.check_collection_limit(1, 5).is_ok()); |
| 162 | assert!(store.check_collection_limit(1, 10).is_err()); |
| 163 | assert!(store.check_collection_limit(2, 999).is_ok()); // No ceiling for tenant 2. |
| 164 | } |
| 165 | |
| 166 | #[test] |
| 167 | fn audit_always_forbidden() { |