Watch
0
0
Fork
You've already forked hyperhive
0

send agent traffic through squid once its hive announces it

This commit is contained in:
atlas 2026-10-28 14:35:08 +01:00
commit b551eb02ff

View file

@ -541,6 +541,8 @@ fn hive_facts_carry_the_per_host_values() {
let facts = hive_facts_from(&hive, |name| match name {
"HYPERHIVE_OTEL_EXTRA_RESOURCE_ATTRIBUTES" => Some("team=a".to_owned()),
"HIVE_AGENT_NATS_URL" => Some("tls://nats.t.local:4222".to_owned()),
"HIVE_SQUID_PROXY" => Some("10.42.0.1:3128".to_owned()),
"HIVE_EGRESS_NO_PROXY" => Some("10.42.0.1,t.local".to_owned()),
_ => None,
});
assert_eq!(facts.dashboard_port, Some(7123));
@ -556,6 +558,8 @@ fn hive_facts_carry_the_per_host_values() {
facts.agent_nats_url.as_deref(),
Some("tls://nats.t.local:4222")
);
assert_eq!(facts.squid_proxy.as_deref(), Some("10.42.0.1:3128"));
assert_eq!(facts.egress_no_proxy.as_deref(), Some("10.42.0.1,t.local"));
}
/// Unset and empty both leave a fact out, so the agent falls back to its
@ -568,5 +572,7 @@ fn hive_facts_leave_unset_values_out() {
assert_eq!(facts.claude_code_path, None);
assert_eq!(facts.otel_extra_resource_attributes, None);
assert_eq!(facts.agent_nats_url, None);
assert_eq!(facts.squid_proxy, None);
assert_eq!(facts.egress_no_proxy, None);
assert_eq!(facts.name, None);
}