Fix integration test timeouts by increasing CLI timeout for containerized environment

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 <noreply@anthropic.com>
This commit is contained in:
Kristoffer Dalby 2025-07-15 18:10:42 +00:00
parent 91ff5ab34f
commit fe4978764b

View File

@ -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),