Test report blocked bridges: Check for missing reachability credential

This commit is contained in:
Vecna 2024-04-29 13:24:36 -04:00
parent 188c8b20f6
commit 12524cd1e8
1 changed files with 9 additions and 0 deletions

View File

@ -350,6 +350,15 @@ mod tests {
assert_eq!(resp_str, "OK");
// We should not be able to level up
let (id, key) = bridge_table::from_scalar(cred.bucket).unwrap();
let mut binding = th.context.ba.lock().unwrap();
binding.advance_days(1);
let encbuckets = binding.enc_bridge_table();
let bucket =
bridge_table::BridgeTable::decrypt_bucket(id, &key, encbuckets.get(&id).unwrap())
.unwrap();
drop(binding);
assert!(bucket.1.is_none());
assert!(level_up(&mut th, &cred).await.is_err());
}