- Notifications
You must be signed in to change notification settings - Fork956
chore: add easy NAT integration tests part 2#13312
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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 | ||
} |
There was a problem hiding this comment.
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 liketype ClientRole int
would be clearer. From a quick reading it's hard to tell which is which.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Refactored into aClient
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.
Uh oh!
There was an error while loading.Please reload this page.
Closes#13043
Closes#13193