From a6760a4c5d9e56a24e2f409b75e271aedd3452f0 Mon Sep 17 00:00:00 2001 From: "claude[bot]" Date: Tue, 3 Feb 2026 17:27:49 +0000 Subject: [PATCH] fix: add NO_PROXY to test_vm_uses_ipv6_proxy to bypass proxy for registry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test_vm_uses_ipv6_proxy test was failing because it set a fake IPv6 proxy URL (using the host's global IPv6 address) but this caused podman inside the VM to try using that proxy for pulling alpine:latest. The pull failed with 'network is unreachable' because the VM cannot directly reach the host's global IPv6 address - slirp4netns IPv6 NAT doesn't make host global IPs directly accessible. The test only needs to verify that proxy env vars are passed to the VM, not that the proxy actually works. The fix sets NO_PROXY/no_proxy to exclude Docker registries from proxy usage, allowing image pulls to succeed while still testing that proxy environment variables are correctly propagated. Fixes CI failure in test_vm_uses_ipv6_proxy and related proxy/IPv6 tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- tests/test_proxy.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/test_proxy.rs b/tests/test_proxy.rs index 83748ca1..8ac39c0d 100644 --- a/tests/test_proxy.rs +++ b/tests/test_proxy.rs @@ -56,6 +56,10 @@ async fn test_vm_uses_ipv6_proxy() -> Result<()> { println!("Starting VM with proxy env: {}", proxy_url); + // Set NO_PROXY to exclude the Docker registry from proxy usage + // This allows the test to verify proxy env vars are passed while still allowing image pulls to succeed + let no_proxy = "registry-1.docker.io,docker.io"; + // Start VM with proxy env vars (no image pull through proxy - use alpine which should be cached) let (mut child, pid) = common::spawn_fcvm_with_env( &[ @@ -70,7 +74,12 @@ async fn test_vm_uses_ipv6_proxy() -> Result<()> { "sleep", "infinity", ], - &[("http_proxy", &proxy_url), ("https_proxy", &proxy_url)], + &[ + ("http_proxy", &proxy_url), + ("https_proxy", &proxy_url), + ("no_proxy", no_proxy), + ("NO_PROXY", no_proxy), + ], ) .await .context("spawn fcvm with proxy env")?;