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

Fix ipWhiteList test: Change ports + use internal fetch API #3180

Conversation

KristjanESPERANTO
Copy link
Contributor

  • Port change should fix a timing issue (mentioned in Update dependencies and actions #3179).
  • Use the internal fetch API in preparation for not being dependent on the external fetch package in the future.

@codecov-commenter
Copy link

Codecov Report

Merging #3180 (9c4aafb) into develop (ef20fe2) will increase coverage by 0.08%.
The diff coverage is n/a.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more.

@@             Coverage Diff             @@
##           develop    #3180      +/-   ##
===========================================
+ Coverage    26.15%   26.23%   +0.08%     
===========================================
  Files           53       53              
  Lines        11502    11502              
===========================================
+ Hits          3008     3018      +10     
+ Misses        8494     8484      -10     

see 2 files with indirect coverage changes

@KristjanESPERANTO KristjanESPERANTO marked this pull request as ready for review September 6, 2023 16:54
@KristjanESPERANTO KristjanESPERANTO changed the title Change ports + use internal fetch API Fix ipWhiteList test: Change ports + use internal fetch API Sep 6, 2023
@rejas rejas requested a review from khassel September 6, 2023 18:37
@@ -10,7 +10,7 @@ describe("ipWhitelist directive configuration", () => {
});

it("should return 403", async () => {
const res = await helpers.fetch("http://localhost:8080");
const res = await fetch("http://localhost:8181");
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should still use helpers.fetch here and in line 27 because I don't want to mix up using node-fetch and internal fetch. Tested this with helpers.fetch and this works too.

Other question: I think you looked into running with internal fetch, are there still problems? Tested internal fetch and all e2e tests run locally ...

Copy link
Contributor Author

@KristjanESPERANTO KristjanESPERANTO Sep 6, 2023

Choose a reason for hiding this comment

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

I accidentally closed the PR 🤦 I created a new one where I didn't change fetch: #3181

I still have issues with my PR for the internal fetch: #3172. I'm just stuck there and at the moment I don't have a good idea of how to proceed: https://github.com/MichMich/MagicMirror/actions/runs/6102949232/job/16562462648#step:5:1164 Hints would be very welcome.

Copy link
Collaborator

Choose a reason for hiding this comment

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

thanks, will try to look into this within the next days ...

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.

3 participants