Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add easy NAT integration tests part 2 #13312

Merged
merged 2 commits into from
May 24, 2024
Merged

Conversation

deansheather
Copy link
Member

@deansheather deansheather commented May 20, 2024

Closes #13043
Closes #13193

Comment on lines 267 to 271
func StartClientDERP(t *testing.T, logger slog.Logger, serverURL *url.URL, derpMap *tailcfg.DERPMap, clientNumber int, myID, peerID uuid.UUID) *tailnet.Conn {
listenPort := uint16(client1Port)
if clientNumber == 2 {
listenPort = client2Port
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clientNumber feels pretty ambiguous. I think something like type ClientRole int would be clearer. From a quick reading it's hard to tell which is which.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactored into a Client struct that contains all the details that gets passed around instead. The client processes still use a "number" so they can select the correct struct as "me", but it's a const now.

@deansheather deansheather merged commit e5bb0a7 into main May 24, 2024
32 checks passed
@deansheather deansheather deleted the dean/easy-nat-int branch May 24, 2024 06:32
@github-actions github-actions bot locked and limited conversation to collaborators May 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add STUN to network topology test suite Add Topology Test for Easy NAT <-> Easy NAT
2 participants