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
|
|
@ -1787,7 +1787,7 @@ pub(crate) fn queue_agent_renewals(
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::routes::tests::state_with_roster;
|
||||
use crate::routes::tests::state_with_roster_queued;
|
||||
|
||||
pub(crate) fn changed(agent: &str, rev: &str, pr: u64) -> crate::config_pr::ChangedConfigPr {
|
||||
crate::config_pr::ChangedConfigPr {
|
||||
|
|
@ -2219,7 +2219,7 @@ mod tests {
|
|||
async fn the_deploy_waits_for_the_pause_to_be_declared() {
|
||||
use hive_jobq_wire::WireNode as _;
|
||||
|
||||
let (state, sched) = state_with_roster();
|
||||
let (_nats, state, sched) = state_with_roster_queued().await;
|
||||
let _queued = crate::routes::agents::create_agent(
|
||||
axum::extract::State(state),
|
||||
axum::Json(swarm_controller_api::agents::CreateAgentRequest {
|
||||
|
|
@ -2228,6 +2228,7 @@ mod tests {
|
|||
limits: None,
|
||||
inference: None,
|
||||
permissions: None,
|
||||
unrestricted_internet: None,
|
||||
archetype: None,
|
||||
agents_md: None,
|
||||
}),
|
||||
|
|
@ -3031,7 +3032,7 @@ mod tests {
|
|||
async fn the_deploy_waits_for_the_mint_and_is_not_cancelled_by_it() {
|
||||
use hive_jobq_wire::WireNode as _;
|
||||
|
||||
let (state, sched) = state_with_roster();
|
||||
let (_nats, state, sched) = state_with_roster_queued().await;
|
||||
let _queued = crate::routes::agents::create_agent(
|
||||
axum::extract::State(state),
|
||||
axum::Json(swarm_controller_api::agents::CreateAgentRequest {
|
||||
|
|
@ -3040,6 +3041,7 @@ mod tests {
|
|||
limits: None,
|
||||
inference: None,
|
||||
permissions: None,
|
||||
unrestricted_internet: None,
|
||||
archetype: None,
|
||||
agents_md: None,
|
||||
}),
|
||||
|
|
@ -3083,7 +3085,7 @@ mod tests {
|
|||
async fn the_forge_token_mint_follows_the_user_and_does_not_block_the_deploy() {
|
||||
use hive_jobq_wire::WireNode as _;
|
||||
|
||||
let (state, sched) = state_with_roster();
|
||||
let (_nats, state, sched) = state_with_roster_queued().await;
|
||||
let _queued = crate::routes::agents::create_agent(
|
||||
axum::extract::State(state),
|
||||
axum::Json(swarm_controller_api::agents::CreateAgentRequest {
|
||||
|
|
@ -3092,6 +3094,7 @@ mod tests {
|
|||
limits: None,
|
||||
inference: None,
|
||||
permissions: None,
|
||||
unrestricted_internet: None,
|
||||
archetype: None,
|
||||
agents_md: None,
|
||||
}),
|
||||
|
|
@ -3143,7 +3146,7 @@ mod tests {
|
|||
async fn the_docs_grant_follows_the_user_and_is_not_a_deploy_parent() {
|
||||
use hive_jobq_wire::WireNode as _;
|
||||
|
||||
let (state, sched) = state_with_roster();
|
||||
let (_nats, state, sched) = state_with_roster_queued().await;
|
||||
let _queued = crate::routes::agents::create_agent(
|
||||
axum::extract::State(state),
|
||||
axum::Json(swarm_controller_api::agents::CreateAgentRequest {
|
||||
|
|
@ -3152,6 +3155,7 @@ mod tests {
|
|||
limits: None,
|
||||
inference: None,
|
||||
permissions: None,
|
||||
unrestricted_internet: None,
|
||||
archetype: None,
|
||||
agents_md: None,
|
||||
}),
|
||||
|
|
@ -3350,7 +3354,7 @@ mod tests {
|
|||
async fn the_matrix_account_mint_is_a_root_and_does_not_block_the_deploy() {
|
||||
use hive_jobq_wire::WireNode as _;
|
||||
|
||||
let (state, sched) = state_with_roster();
|
||||
let (_nats, state, sched) = state_with_roster_queued().await;
|
||||
let _queued = crate::routes::agents::create_agent(
|
||||
axum::extract::State(state),
|
||||
axum::Json(swarm_controller_api::agents::CreateAgentRequest {
|
||||
|
|
@ -3359,6 +3363,7 @@ mod tests {
|
|||
limits: None,
|
||||
inference: None,
|
||||
permissions: None,
|
||||
unrestricted_internet: None,
|
||||
archetype: None,
|
||||
agents_md: None,
|
||||
}),
|
||||
|
|
|
|||
Loading…
Reference in a new issue