mirror of
https://forge.darkest.space/hyperhive/hyperhive.git
synced 2026-12-02 13:00:57 +01:00
swarm-controller: placement sub-state for create_agent, get_hive_wanted, post_agent_custom
This commit is contained in:
parent
78a59f1e79
commit
9b19fbe398
1 changed files with 236 additions and 80 deletions
|
|
@ -2053,6 +2053,7 @@ pub(crate) fn queue_agent_renewals(
|
|||
mod tests {
|
||||
use super::*;
|
||||
use crate::routes::tests::state_with_roster_queued;
|
||||
use axum::extract::FromRef as _;
|
||||
|
||||
pub(crate) fn changed(agent: &str, rev: &str, pr: u64) -> crate::config_pr::ChangedConfigPr {
|
||||
crate::config_pr::ChangedConfigPr {
|
||||
|
|
@ -2509,7 +2510,7 @@ mod tests {
|
|||
|
||||
let (_nats, state, sched) = state_with_roster_queued().await;
|
||||
let _queued = crate::routes::agents::create_agent(
|
||||
axum::extract::State(state),
|
||||
axum::extract::State(crate::routes::agents::PlacementState::from_ref(&state)),
|
||||
axum::Json(swarm_controller_api::agents::CreateAgentRequest {
|
||||
name: "atlas".to_owned(),
|
||||
hive: "pr1ma".to_owned(),
|
||||
|
|
@ -3506,7 +3507,7 @@ mod tests {
|
|||
|
||||
let (_nats, state, sched) = state_with_roster_queued().await;
|
||||
let _queued = crate::routes::agents::create_agent(
|
||||
axum::extract::State(state),
|
||||
axum::extract::State(crate::routes::agents::PlacementState::from_ref(&state)),
|
||||
axum::Json(swarm_controller_api::agents::CreateAgentRequest {
|
||||
name: "atlas".to_owned(),
|
||||
hive: "pr1ma".to_owned(),
|
||||
|
|
@ -3559,7 +3560,7 @@ mod tests {
|
|||
|
||||
let (_nats, state, sched) = state_with_roster_queued().await;
|
||||
let _queued = crate::routes::agents::create_agent(
|
||||
axum::extract::State(state),
|
||||
axum::extract::State(crate::routes::agents::PlacementState::from_ref(&state)),
|
||||
axum::Json(swarm_controller_api::agents::CreateAgentRequest {
|
||||
name: "atlas".to_owned(),
|
||||
hive: "pr1ma".to_owned(),
|
||||
|
|
@ -3620,7 +3621,7 @@ mod tests {
|
|||
|
||||
let (_nats, state, sched) = state_with_roster_queued().await;
|
||||
let _queued = crate::routes::agents::create_agent(
|
||||
axum::extract::State(state),
|
||||
axum::extract::State(crate::routes::agents::PlacementState::from_ref(&state)),
|
||||
axum::Json(swarm_controller_api::agents::CreateAgentRequest {
|
||||
name: "atlas".to_owned(),
|
||||
hive: "pr1ma".to_owned(),
|
||||
|
|
@ -3897,7 +3898,7 @@ mod tests {
|
|||
|
||||
let (_nats, state, sched) = state_with_roster_queued().await;
|
||||
let _queued = crate::routes::agents::create_agent(
|
||||
axum::extract::State(state),
|
||||
axum::extract::State(crate::routes::agents::PlacementState::from_ref(&state)),
|
||||
axum::Json(swarm_controller_api::agents::CreateAgentRequest {
|
||||
name: "atlas".to_owned(),
|
||||
hive: "pr1ma".to_owned(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue