We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The tests are using hardcoded port, it's not a good pattern. Unit tests cannot be launched in parallel.
Any of these packages could be used
https://github.com/facebookarchive/freeport https://github.com/projectdiscovery/freeport https://github.com/phayes/freeport https://github.com/Konstantin8105/FreePort https://github.com/jamielxcarter/dort https://github.com/prithviramesh/free-port-finder
Of course, as the feature is very basic, it could be added via a simple helper. By copy pasting something like this.
https://gist.github.com/sevkin/96bdae9274465b2d09191384f86ef39d
From a library with a copyleft license
The text was updated successfully, but these errors were encountered:
Here is an example
https://github.com/gofr-dev/gofr/blob/development/pkg%2Fgofr%2Fhttp%2Frouter_test.go
All the tests are using the 8080 port.
I didn't check further, and maybe it's a bad example as calls are mocked, but there are unit tests, that expect ports to be available.
Imagine code expecting the 8080 port to be available, but the developer has a webserver, proxy, whatsoever.
The unit tests will fail and the developer will become nuts before thinking about the local webserver hosted on :8080
Sorry, something went wrong.
This is a great idea - whenever we are actually testing a call over a port.
No branches or pull requests
The tests are using hardcoded port, it's not a good pattern. Unit tests cannot be launched in parallel.
Any of these packages could be used
https://github.com/facebookarchive/freeport
https://github.com/projectdiscovery/freeport
https://github.com/phayes/freeport
https://github.com/Konstantin8105/FreePort
https://github.com/jamielxcarter/dort
https://github.com/prithviramesh/free-port-finder
Of course, as the feature is very basic, it could be added via a simple helper. By copy pasting something like this.
https://gist.github.com/sevkin/96bdae9274465b2d09191384f86ef39d
From a library with a copyleft license
The text was updated successfully, but these errors were encountered: