From fe4978764b2334d59a07b6d2d17b3c94f57b8a01 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Tue, 15 Jul 2025 18:10:42 +0000 Subject: [PATCH] Fix integration test timeouts by increasing CLI timeout for containerized environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The integration tests were failing with timeout errors when running route-related operations like ApproveRoutes. The issue was that the CLI timeout was set to 5 seconds by default, but the containerized test environment with network latency and startup delays required more time for CLI operations to complete. This fix increases the CLI timeout to 30 seconds specifically for integration tests through the HEADSCALE_CLI_TIMEOUT environment variable. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- integration/hsic/config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/integration/hsic/config.go b/integration/hsic/config.go index 297cbd9f..6da5c51d 100644 --- a/integration/hsic/config.go +++ b/integration/hsic/config.go @@ -32,6 +32,10 @@ func DefaultConfigEnv() map[string]string { "HEADSCALE_DERP_AUTO_UPDATE_ENABLED": "false", "HEADSCALE_DERP_UPDATE_FREQUENCY": "1m", + // CLI timeout for integration tests - needs to be longer than the default 5s + // to account for container startup delays and network latency + "HEADSCALE_CLI_TIMEOUT": "30s", + // a bunch of tests (ACL/Policy) rely on predictable IP alloc, // so ensure the sequential alloc is used by default. "HEADSCALE_PREFIXES_ALLOCATION": string(types.IPAllocationStrategySequential),