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

Add assert func for verifying status, netmap and netcheck #1723

Merged
merged 4 commits into from
Feb 9, 2024

Conversation

kradalby
Copy link
Collaborator

@kradalby kradalby commented Feb 8, 2024

This PR adds three new integration test assert methods which will do the following for the "general" case:

assertValidNetmap: in clients which support tailscale debug netmap it will dump the netmap and verify that it is in a known "good" state, this includes checking for endpoints, derp relays, ips, online status and more.

assertValidStatus: check the output of the tailscale status command, checking derp relay, hostname, os, peer ips, network map status and magic sock status

assertValidNetcheck: checks that the client has a valid DERP server using output from tailscale netcheck.

The "general" case is any all to all communication, it does not account for things like nodes with ACLs and similar.

This also splits "PingAllByAll" into two, one version which use internal DERP for better use offline or dodgy internet, and one with public DERP.

Signed-off-by: Kristoffer Dalby kristoffer@tailscale.com

@@ -190,9 +190,15 @@ func (h *Headscale) handlePoll(
return
}

// TODO(kradalby): Figure out why patch changes does
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will work on this in a follow up so it doesnt become even bigger.

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
@kradalby kradalby merged commit 00e7550 into juanfont:main Feb 9, 2024
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants