[PR #2105] [MERGED] 2068 AutoApprovers tests #2499

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2105
Author: @kradalby
Created: 9/5/2024
Status: Merged
Merged: 9/5/2024
Merged by: @kradalby

Base: mainHead: kradalby/approved-routes-2068


📝 Commits (3)

  • 25da8c4 replace old suite approved routes test with table driven
  • 6f1bba5 add test to reproduce issue
  • 95ae548 add integration test for 2068

📊 Changes

5 files changed (+214 additions, -69 deletions)

View changed files

📝 .github/workflows/test-integration.yaml (+1 -0)
📝 hscontrol/db/node_test.go (+101 -49)
📝 hscontrol/poll.go (+3 -20)
📝 hscontrol/util/net.go (+19 -0)
📝 integration/route_test.go (+90 -0)

📄 Description

Fixes #2068

Summary by CodeRabbit

  • New Features

    • Introduced a new utility function for comparing IP prefixes, enhancing comparison logic across the application.
    • Added a new test case for validating auto-approved subroutes, improving testing coverage.
  • Refactor

    • Updated the testing framework for auto-approval routes, improving test structure and readability.
    • Streamlined the hostInfoChanged function by removing redundant code and utilising a centralised comparison method.
  • Bug Fixes

    • Enhanced validation of auto-approval logic for routes, ensuring accurate results across multiple test cases.

🔄 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/2105 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 9/5/2024 **Status:** ✅ Merged **Merged:** 9/5/2024 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `kradalby/approved-routes-2068` --- ### 📝 Commits (3) - [`25da8c4`](https://github.com/juanfont/headscale/commit/25da8c4f638b47cf34e3e87b3adbbe681a34145c) replace old suite approved routes test with table driven - [`6f1bba5`](https://github.com/juanfont/headscale/commit/6f1bba5342e141fc6c71cf5291e3f471af72eceb) add test to reproduce issue - [`95ae548`](https://github.com/juanfont/headscale/commit/95ae548a20649623b31d0cf29dfadc344067a96b) add integration test for 2068 ### 📊 Changes **5 files changed** (+214 additions, -69 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/test-integration.yaml` (+1 -0) 📝 `hscontrol/db/node_test.go` (+101 -49) 📝 `hscontrol/poll.go` (+3 -20) 📝 `hscontrol/util/net.go` (+19 -0) 📝 `integration/route_test.go` (+90 -0) </details> ### 📄 Description Fixes #2068 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new utility function for comparing IP prefixes, enhancing comparison logic across the application. - Added a new test case for validating auto-approved subroutes, improving testing coverage. - **Refactor** - Updated the testing framework for auto-approval routes, improving test structure and readability. - Streamlined the `hostInfoChanged` function by removing redundant code and utilising a centralised comparison method. - **Bug Fixes** - Enhanced validation of auto-approval logic for routes, ensuring accurate results across multiple test cases. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <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:21:32 +01:00
adam closed this issue 2025-12-29 03:21:32 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2499