[PR #5699] [MERGED] [management] Extend blackbox tests #23671

Closed
opened 2026-08-05 06:07:39 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/5699
Author: @pascal-fischer
Created: 3/25/2026
Status: Merged
Merged: 3/26/2026
Merged by: @pascal-fischer

Base: mainHead: tests/extend-blackbox-tests


📝 Commits (4)

📊 Changes

21 files changed (+5525 additions, -38 deletions)

View changed files

management/server/http/testing/integration/accounts_handler_integration_test.go (+238 -0)
management/server/http/testing/integration/dns_handler_integration_test.go (+554 -0)
management/server/http/testing/integration/events_handler_integration_test.go (+105 -0)
management/server/http/testing/integration/groups_handler_integration_test.go (+382 -0)
management/server/http/testing/integration/networks_handler_integration_test.go (+1434 -0)
management/server/http/testing/integration/peers_handler_integration_test.go (+605 -0)
management/server/http/testing/integration/policies_handler_integration_test.go (+488 -0)
management/server/http/testing/integration/routes_handler_integration_test.go (+455 -0)
📝 management/server/http/testing/integration/setupkeys_handler_integration_test.go (+39 -33)
management/server/http/testing/integration/users_handler_integration_test.go (+701 -0)
management/server/http/testing/testdata/accounts.sql (+18 -0)
management/server/http/testing/testdata/dns.sql (+21 -0)
management/server/http/testing/testdata/events.sql (+18 -0)
management/server/http/testing/testdata/groups.sql (+19 -0)
management/server/http/testing/testdata/networks.sql (+25 -0)
management/server/http/testing/testdata/peers_integration.sql (+20 -0)
management/server/http/testing/testdata/policies.sql (+23 -0)
management/server/http/testing/testdata/routes.sql (+23 -0)
management/server/http/testing/testdata/users_integration.sql (+24 -0)
📝 management/server/http/testing/testing_tools/channel/channel.go (+111 -5)

...and 1 more files

📄 Description

Describe your changes

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

Summary by CodeRabbit

  • Tests

    • Added extensive integration tests covering accounts, groups, networks, peers, policies, routes, DNS, users, and events to validate auth, CRUD flows, and persistence.
    • New end-to-end scenarios exercise token/role authorization, request validation, and response contents.
  • Test Data

    • Added SQL fixtures to seed realistic DB states for each suite.
  • Chores

    • Enhanced test harness with DB verification helpers and peer-update assertions for stricter end-to-end validation.

🔄 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/netbirdio/netbird/pull/5699 **Author:** [@pascal-fischer](https://github.com/pascal-fischer) **Created:** 3/25/2026 **Status:** ✅ Merged **Merged:** 3/26/2026 **Merged by:** [@pascal-fischer](https://github.com/pascal-fischer) **Base:** `main` ← **Head:** `tests/extend-blackbox-tests` --- ### 📝 Commits (4) - [`781717a`](https://github.com/netbirdio/netbird/commit/781717a8ec497e295f24bb24f4472b870f6a6261) extend the existing blackbox tests - [`a9ed9d1`](https://github.com/netbirdio/netbird/commit/a9ed9d1d5c8fdd376a11bdde8039fc8242747567) update events test - [`83e7108`](https://github.com/netbirdio/netbird/commit/83e7108e4bf60b6c5185c2eb346de9f6077350b3) use gorm to test DB - [`f2c5563`](https://github.com/netbirdio/netbird/commit/f2c556363e73a7e30c521ac7bd8f7280c30301e8) push missing tools ### 📊 Changes **21 files changed** (+5525 additions, -38 deletions) <details> <summary>View changed files</summary> ➕ `management/server/http/testing/integration/accounts_handler_integration_test.go` (+238 -0) ➕ `management/server/http/testing/integration/dns_handler_integration_test.go` (+554 -0) ➕ `management/server/http/testing/integration/events_handler_integration_test.go` (+105 -0) ➕ `management/server/http/testing/integration/groups_handler_integration_test.go` (+382 -0) ➕ `management/server/http/testing/integration/networks_handler_integration_test.go` (+1434 -0) ➕ `management/server/http/testing/integration/peers_handler_integration_test.go` (+605 -0) ➕ `management/server/http/testing/integration/policies_handler_integration_test.go` (+488 -0) ➕ `management/server/http/testing/integration/routes_handler_integration_test.go` (+455 -0) 📝 `management/server/http/testing/integration/setupkeys_handler_integration_test.go` (+39 -33) ➕ `management/server/http/testing/integration/users_handler_integration_test.go` (+701 -0) ➕ `management/server/http/testing/testdata/accounts.sql` (+18 -0) ➕ `management/server/http/testing/testdata/dns.sql` (+21 -0) ➕ `management/server/http/testing/testdata/events.sql` (+18 -0) ➕ `management/server/http/testing/testdata/groups.sql` (+19 -0) ➕ `management/server/http/testing/testdata/networks.sql` (+25 -0) ➕ `management/server/http/testing/testdata/peers_integration.sql` (+20 -0) ➕ `management/server/http/testing/testdata/policies.sql` (+23 -0) ➕ `management/server/http/testing/testdata/routes.sql` (+23 -0) ➕ `management/server/http/testing/testdata/users_integration.sql` (+24 -0) 📝 `management/server/http/testing/testing_tools/channel/channel.go` (+111 -5) _...and 1 more files_ </details> ### 📄 Description ## Describe your changes ## Issue ticket number and link ## Stack <!-- branch-stack --> ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) ### Docs PR URL (required if "docs added" is checked) Paste the PR link from https://github.com/netbirdio/docs here: https://github.com/netbirdio/docs/pull/__ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Added extensive integration tests covering accounts, groups, networks, peers, policies, routes, DNS, users, and events to validate auth, CRUD flows, and persistence. * New end-to-end scenarios exercise token/role authorization, request validation, and response contents. * **Test Data** * Added SQL fixtures to seed realistic DB states for each suite. * **Chores** * Enhanced test harness with DB verification helpers and peer-update assertions for stricter end-to-end validation. <!-- 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>
saavagebueno added the pull-request label 2026-08-05 06:07:40 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#23671