Watch
0
0
Fork
You've already forked hyperhive
0

the builder reads an agent's icon from its config and the controller writes the swarm's copy

This commit is contained in:
iris 2026-11-16 22:21:21 +01:00 • committed by mara
commit 181ef5f421

View file

@ -623,6 +623,7 @@ async fn handle_meta(
cached,
private_users,
nix_builds,
..
} => tracing::info!(
agent = %job.agent,
meta_rev = %job.meta_rev,
@ -864,6 +865,7 @@ mod tests {
cached: false,
private_users: Some(false),
nix_builds: Some(hive_types::NixBuilds::Host),
icon: None,
}
},
)
@ -887,6 +889,7 @@ mod tests {
cached: false,
private_users: Some(false),
nix_builds: Some(hive_types::NixBuilds::Host),
icon: None,
}
},
)
@ -1473,9 +1476,9 @@ mod tests {
"nix_builds": "host",
})
);
assert_eq!(fake.lines("tokens"), ["forge-token"; 3]);
assert_eq!(fake.lines("tokens"), ["forge-token"; 4]);
let calls = fake.calls();
assert_eq!(calls.len(), 3, "{calls:?}");
assert_eq!(calls.len(), 4, "{calls:?}");
assert!(
calls[0].contains(&format!(
"git+https://forge.example/internal/meta.git?rev={REV}#nixosConfigurations.atlas.config.system.build.toplevel"
@ -1490,6 +1493,11 @@ mod tests {
calls[2].contains("services.hyperhive.agent.nixBuilds"),
"{calls:?}"
);
// The icon is read as the text of the file the option names.
assert!(
calls[3].contains("services.hyperhive.agent.icon") && calls[3].contains("--apply"),
"{calls:?}"
);
}
/// An option the module does not declare is false; one whose eval failed, or
@ -1605,7 +1613,7 @@ mod tests {
];
serve_meta(fake.builder(), env, msgs).await;
assert_eq!(next(&mut sent).await.0, "_INBOX.2");
assert_eq!(fake.calls().len(), 3, "one build and its two option reads");
assert_eq!(fake.calls().len(), 4, "one build and its three option reads");
}
#[tokio::test(start_paused = true)]