Watch
0
0
Fork
You've already forked hyperhive
0

swarm: unrestricted_internet flag on the agent permissions record, unset reads as on, create writes false

This commit is contained in:
atlas 2026-10-27 11:29:06 +01:00 • committed by mara
commit 8699857024

View file

@ -315,6 +315,21 @@ pub(crate) mod tests {
(state, sched)
}
/// [`state_with_roster`] with a connected queue, for creations: they
/// store the agent's permissions through it. The server lives as long as
/// the first element.
pub(crate) async fn state_with_roster_queued()
-> (crate::test_nats::TestNats, super::AppState, SharedSched) {
let nats = crate::test_nats::TestNats::start();
let client = nats.client().await;
let (mut state, sched) = state_with_roster();
state.status = Some(std::sync::Arc::new(crate::status::StatusReader::new(
client,
std::time::Duration::from_mins(1),
)));
(nats, state, sched)
}
/// `wanted_error_status` as a pure function first: build the exact
/// `swarm_queue_client::Error::NotConnected` `ensure_connected` raises,
/// wrap it the same way `?` inside `WantedWriter::view`/`set` does, and