Skip to content

Conversation

per1234
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

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

Labels

topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant