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

Websocket derp test fixes #2247

Merged
merged 5 commits into from
Nov 22, 2024
Merged

Conversation

enoperm
Copy link
Contributor

@enoperm enoperm commented Nov 19, 2024

  • have read the CONTRIBUTING.md file
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

Fixes #2241

Copy link
Collaborator

@kradalby kradalby left a comment

Choose a reason for hiding this comment

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

two nits, otherwise good

err = s.CreateTailscaleIsolatedNodesInUser(
hash,
userName,
"all",
"head",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This can be the VersionHead constant you added

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, I probably missed this instance because I only looked at the linter output when I introduced that constant.

// This option is only meaningful when invoked on **HEAD** versions of the client.
// Attempts to use it with any other version is a bug in the calling code.
func WithBuildTag(tag string) Option {
return func(tsic *TailscaleInContainer) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I propose panicking here if the tsic passed is not HEAD, just to fail fast so the dev can fix it without faffing around.

Copy link
Contributor Author

@enoperm enoperm Nov 21, 2024

Choose a reason for hiding this comment

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

Done, for now I have opted to panic with the same error value I return from the other checks.
At this point I think it might be safe to remove the build tags check here, but since I wrote it to be generic and check for any build time config, it may still catch mistakes on future build options. I am not against removing it if desired, though.

@kradalby kradalby merged commit 5fbf3f8 into juanfont:main Nov 22, 2024
123 checks passed
@kradalby
Copy link
Collaborator

Thanks!

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.

[Bug] TestDERPServerWebsocketScenario is broken
2 participants