[PR #2464] [MERGED] Multi network integration tests #2676

Closed
opened 2025-12-29 03:22:19 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2464
Author: @kradalby
Created: 3/5/2025
Status: Merged
Merged: 3/21/2025
Merged by: @kradalby

Base: mainHead: kradalby/multi-network-integration-tests


📝 Commits (10+)

📊 Changes

29 files changed (+2374 additions, -1438 deletions)

View changed files

📝 .github/workflows/test-integration-policyv2.yaml (+2 -1)
📝 .github/workflows/test-integration.yaml (+2 -1)
📝 hscontrol/mapper/mapper_test.go (+5 -1)
📝 hscontrol/mapper/tail.go (+6 -10)
📝 hscontrol/mapper/tail_test.go (+5 -7)
📝 hscontrol/routes/primary.go (+18 -13)
📝 hscontrol/routes/primary_test.go (+254 -102)
📝 hscontrol/types/node.go (+15 -1)
📝 hscontrol/util/string.go (+9 -0)
📝 hscontrol/util/util.go (+127 -0)
📝 hscontrol/util/util_test.go (+191 -1)
📝 integration/acl_test.go (+30 -42)
📝 integration/auth_key_test.go (+24 -24)
📝 integration/auth_oidc_test.go (+86 -405)
📝 integration/auth_web_flow_test.go (+20 -163)
📝 integration/cli_test.go (+97 -97)
📝 integration/control.go (+0 -1)
📝 integration/derp_verify_endpoint_test.go (+7 -6)
📝 integration/dns_test.go (+21 -21)
📝 integration/dsic/dsic.go (+9 -9)

...and 9 more files

📄 Description

Currently the integration tests only support a single network (with the exception of DERP which has a custom implementation).

This is making it hard to properly test subnet routers (and exit nodes), we currently only look at the output map sent to the nodes.

The goal here is to mold the integration tests into something that supports nodes in multiple docker networks so we can test some basic features.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/2464 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 3/5/2025 **Status:** ✅ Merged **Merged:** 3/21/2025 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `kradalby/multi-network-integration-tests` --- ### 📝 Commits (10+) - [`f7f7b13`](https://github.com/juanfont/headscale/commit/f7f7b13faa760ef731698adfca36e684e5893437) make Scenario.networks a list - [`9001707`](https://github.com/juanfont/headscale/commit/9001707d44f847efae9b7d773aa083f71e566f05) switch to new spec format - [`5f8b3b8`](https://github.com/juanfont/headscale/commit/5f8b3b8072aa75ebaa451f12cd5507c3a2db7816) panic if no networks are set - [`3e30f82`](https://github.com/juanfont/headscale/commit/3e30f82acde0559689401cf599b048b8cf99da48) pass spec at scenario create - [`52d005b`](https://github.com/juanfont/headscale/commit/52d005b248b553f9ccbde6dbcbdb2e55ac61db72) make derp test lest special - [`94bc822`](https://github.com/juanfont/headscale/commit/94bc822196bddd5cca56951b20bc3596a6b56e0a) untangle and remove custom oidc scenario - [`9968e5d`](https://github.com/juanfont/headscale/commit/9968e5dcc970cfacb067a08521e7aa1cacdfc2e0) remove special webauth scenario - [`8a51bd3`](https://github.com/juanfont/headscale/commit/8a51bd3c64a9f3dae844ce7589fba251ebc1755c) fix ups - [`6e36f9f`](https://github.com/juanfont/headscale/commit/6e36f9fcf0bd891ffcb74602beeacbd33c5861d5) initial hav2 test - [`32dda96`](https://github.com/juanfont/headscale/commit/32dda96a57057278d5c46421c885a46142ac5143) fully test subnet router ### 📊 Changes **29 files changed** (+2374 additions, -1438 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/test-integration-policyv2.yaml` (+2 -1) 📝 `.github/workflows/test-integration.yaml` (+2 -1) 📝 `hscontrol/mapper/mapper_test.go` (+5 -1) 📝 `hscontrol/mapper/tail.go` (+6 -10) 📝 `hscontrol/mapper/tail_test.go` (+5 -7) 📝 `hscontrol/routes/primary.go` (+18 -13) 📝 `hscontrol/routes/primary_test.go` (+254 -102) 📝 `hscontrol/types/node.go` (+15 -1) 📝 `hscontrol/util/string.go` (+9 -0) 📝 `hscontrol/util/util.go` (+127 -0) 📝 `hscontrol/util/util_test.go` (+191 -1) 📝 `integration/acl_test.go` (+30 -42) 📝 `integration/auth_key_test.go` (+24 -24) 📝 `integration/auth_oidc_test.go` (+86 -405) 📝 `integration/auth_web_flow_test.go` (+20 -163) 📝 `integration/cli_test.go` (+97 -97) 📝 `integration/control.go` (+0 -1) 📝 `integration/derp_verify_endpoint_test.go` (+7 -6) 📝 `integration/dns_test.go` (+21 -21) 📝 `integration/dsic/dsic.go` (+9 -9) _...and 9 more files_ </details> ### 📄 Description Currently the integration tests only support a single network (with the exception of DERP which has a custom implementation). This is making it hard to properly test subnet routers (and exit nodes), we currently only look at the output map sent to the nodes. The goal here is to mold the integration tests into something that supports nodes in multiple docker networks so we can test some basic features. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 03:22:19 +01:00
adam closed this issue 2025-12-29 03:22:19 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2676