-
Notifications
You must be signed in to change notification settings - Fork 312
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
remove most get-port usage in appsec tests #4428
Conversation
Overall package sizeSelf size: 6.71 MB Dependency sizes
🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4428 +/- ##
===========================================
- Coverage 92.64% 80.42% -12.22%
===========================================
Files 116 3 -113
Lines 4173 373 -3800
Branches 33 33
===========================================
- Hits 3866 300 -3566
+ Misses 307 73 -234 ☔ View full report in Codecov by Sentry. |
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.
The only usage left is in Next plugin test because it sends the port to an external process
I'll take a look at this today
edit:
in a quick check, It seems that it is not possible for standalone nextjs tests, in the compiled files I can see this:
const currentPort = parseInt(process.env.PORT, 10) || 3000
If we don't define the port externally, the app will use 3000, if it is not free, it will fail.
What does this PR do?
Remove most get-port usage in AppSec tests.
Motivation
Follow-up of #4426
Additional Notes
The only usage left is in Next plugin test because it sends the port to an external process. If that test could be refactored to avoid doing this, then AppSec tests could be completely free of get-port.