Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Make tests for URL load check rule functions self contained #963

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

Merged
per1234 merged 1 commit into arduino:main from per1234:fix-tests
Sep 15, 2025

Conversation

Copy link
Contributor

@per1234 per1234 commented Sep 15, 2025

Several rules check whether URLs provided in project metadata load.

Previously, the handling of various HTTP response status codes of these rule functions was tested by using the convenient httpstat.us site. Unfortunately the maintainers of that site shut it down months ago due to abuse. This caused the spurious failure of the unit tests. Although the httpstat.us maintainers state that they plan to eventually resume service, there hasn't been any indication of progress on that front.

So it will be best to make the tests self contained, without any dependence on an external site. This is accomplished by creating a local HTTP server that responds with the intended status code. Unfortunately this does require the addition of code to the test in order to generate test data on the fly in order to reference the arbitrary port of the test server.

Several rules check whether URLs provided in project metadata load.
Previously, the handling of various HTTP response status codes of these rule functions was tested by using the
convenient httpstat.us site. Unfortunately the maintainers of that site shut it down months ago due to abuse. This
caused the spurious failure of the unit tests. Although the httpstat.us maintainers state that they plan to eventually
resume service, there hasn't been any indication of progress on that front.
So it will be best to make the tests self contained, without any dependence on an external site. This is accomplished by
creating a local HTTP server that responds with the intended status code. Unfortunately this does require the addition
of code to the test in order to generate test data on the fly in order to reference the arbitrary port of the test
server.
@per1234 per1234 self-assigned this Sep 15, 2025
@per1234 per1234 added topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project labels Sep 15, 2025
Copy link

codecov bot commented Sep 15, 2025
edited
Loading

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.33%. Comparing base (c142981) to head (2a31091).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@
## main #963 +/- ##
=======================================
 Coverage 83.33% 83.33% 
=======================================
 Files 1 1 
 Lines 180 180 
=======================================
 Hits 150 150 
 Misses 19 19 
 Partials 11 11 
Flag Coverage Δ
unit 83.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@per1234 per1234 merged commit e8cfb4a into arduino:main Sep 15, 2025
51 of 52 checks passed
@per1234 per1234 deleted the fix-tests branch September 15, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Labels
topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /