Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(sessions): swap lease accessors between tenant router tests

Steven Enamakel0e61962f4ebe
diff --git a/crates/openhuman-core/src/storage/sessions/tenant_router_tests.rs b/crates/openhuman-core/src/storage/sessions/tenant_router_tests.rs
index f0d9e6b13a..7318046676 100644
--- a/crates/openhuman-core/src/storage/sessions/tenant_router_tests.rs
+++ b/crates/openhuman-core/src/storage/sessions/tenant_router_tests.rs
@@ -123,10 +123,10 @@ fn upstream_rebind_keeps_tenant_routing_and_moves_only_future_leases() {
agent: Some("asha".into()),
});
- let alice_before = router.for_agent(&alice_key);
- let bob_before = router.for_agent(&bob_key);
- let alice_destination = alice_before.transcripts.destination_key();
- let bob_destination = bob_before.transcripts.destination_key();
+ let alice_before = router.lease_for_agent(&alice_key).unwrap();
+ let bob_before = router.lease_for_agent(&bob_key).unwrap();
+ let alice_destination = alice_before.stores().transcripts.destination_key();
+ let bob_destination = bob_before.stores().transcripts.destination_key();
assert_ne!(
alice_destination, bob_destination,
"profiles keep separate scopes"
@@ -190,10 +190,10 @@ fn failed_rebind_rolls_back_tenant_providers_already_moved() {
agent: Some("asha".into()),
});
- let alice_before = router.lease_for_agent(&alice_key).unwrap();
- let bob_before = router.lease_for_agent(&bob_key).unwrap();
- let alice_destination = alice_before.stores().transcripts.destination_key();
- let bob_destination = bob_before.stores().transcripts.destination_key();
+ let alice_before = router.for_agent(&alice_key);
+ let bob_before = router.for_agent(&bob_key);
+ let alice_destination = alice_before.transcripts.destination_key();
+ let bob_destination = bob_before.transcripts.destination_key();
assert_eq!(registry.rebind(&second), 0);
assert!(Arc::ptr_eq(&*router.backend.read().unwrap(), &first));