mirror of
https://github.com/juanfont/headscale.git
synced 2026-02-07 20:04:00 +01:00
Add two integration tests to reproduce and bisect the route installation regression introduced in tailscale/tailscale#18173 (commit c3b7f240): TestPeerRouteInstallation: Verifies that peer /32 routes are installed in kernel routing table 52 when using non-CGNAT IP prefixes. Tests across multiple Tailscale versions including bisect commits around c3b7f240 to pinpoint the regression. Confirmed results: - before-c3b7f240 (e9d8276): PASS - c3b7f240: FAIL (only 100.100.100.100 in table 52) - after-c3b7f240 (5aeee1d): FAIL TestSubnetRouteInstallation: Verifies that subnet routes (10.4.0.0/24) and host routes (10.4.1.1/32) advertised by a peer are installed in table 52 on accepting clients using standard CGNAT peer addressing with --accept-routes. Both tests include bisect commits around c3b7f240. The subnet route variant passes on all versions, confirming the regression only affects non-CGNAT peer IPs without --accept-routes. Updates #1941 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| dockertestutil | ||
| dsic | ||
| hsic | ||
| integrationutil | ||
| tsic | ||
| acl_test.go | ||
| api_auth_test.go | ||
| auth_key_test.go | ||
| auth_oidc_test.go | ||
| auth_web_flow_test.go | ||
| cli_test.go | ||
| control.go | ||
| derp_verify_endpoint_test.go | ||
| dns_test.go | ||
| embedded_derp_test.go | ||
| general_test.go | ||
| helpers.go | ||
| README.md | ||
| route_test.go | ||
| run.sh | ||
| scenario_test.go | ||
| scenario.go | ||
| ssh_test.go | ||
| tags_test.go | ||
| tailscale.go | ||
Integration testing
Headscale relies on integration testing to ensure we remain compatible with Tailscale.
This is typically performed by starting a Headscale server and running a test "scenario" with an array of Tailscale clients and versions.
Headscale's test framework and the current set of scenarios are defined in this directory.
Tests are located in files ending with _test.go and the framework are located in the rest.
Running integration tests locally
The easiest way to run tests locally is to use act, a local GitHub Actions runner:
act pull_request -W .github/workflows/test-integration.yaml
Alternatively, the docker run command in each GitHub workflow file can be used.
Running integration tests on GitHub Actions
Each test currently runs as a separate workflows in GitHub actions, to add new test, run
go generate inside ../cmd/gh-action-integration-generator/ and commit the result.