[PR #2685] [MERGED] Use more Eventually in tests #2800

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2685
Author: @kradalby
Created: 7/13/2025
Status: Merged
Merged: 7/13/2025
Merged by: @kradalby

Base: mainHead: kradalby/eventually


📝 Commits (1)

  • 7a461fb integration: Use Eventually around external calls

📊 Changes

8 files changed (+324 additions, -266 deletions)

View changed files

📝 flake.nix (+2 -2)
📝 integration/auth_key_test.go (+31 -16)
📝 integration/auth_web_flow_test.go (+15 -5)
📝 integration/cli_test.go (+137 -115)
📝 integration/dns_test.go (+14 -27)
📝 integration/embedded_derp_test.go (+31 -31)
📝 integration/general_test.go (+75 -66)
📝 integration/utils.go (+19 -4)

📄 Description

Headscale is essentially a eventually consistent system, so our integration tests should actually have a lot more tolerance for changes that will happen, but might not have happened at the time of checking. This work is wrapping a lot more of the checks in EventuallyWithT, for the case where we check state on client (that might not have been propagated yet) or things like API calls to Headscale.


🔄 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/2685 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 7/13/2025 **Status:** ✅ Merged **Merged:** 7/13/2025 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `kradalby/eventually` --- ### 📝 Commits (1) - [`7a461fb`](https://github.com/juanfont/headscale/commit/7a461fb2db8bfa739585ec1b733a3be2b3cf0ae6) integration: Use Eventually around external calls ### 📊 Changes **8 files changed** (+324 additions, -266 deletions) <details> <summary>View changed files</summary> 📝 `flake.nix` (+2 -2) 📝 `integration/auth_key_test.go` (+31 -16) 📝 `integration/auth_web_flow_test.go` (+15 -5) 📝 `integration/cli_test.go` (+137 -115) 📝 `integration/dns_test.go` (+14 -27) 📝 `integration/embedded_derp_test.go` (+31 -31) 📝 `integration/general_test.go` (+75 -66) 📝 `integration/utils.go` (+19 -4) </details> ### 📄 Description Headscale is essentially a eventually consistent system, so our integration tests should actually have a lot more tolerance for changes that will happen, but might not have happened at the time of checking. This work is wrapping a lot more of the checks in EventuallyWithT, for the case where we check state on client (that might not have been propagated yet) or things like API calls to Headscale. --- <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 04:19:02 +01:00
adam closed this issue 2025-12-29 04:19:02 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2800