swarm: unrestricted_internet flag on the agent permissions record, unset reads as on, create writes false
This commit is contained in:
parent
e77459d2cb
commit
8699857024
1 changed files with 381 additions and 107 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue