lychee icon indicating copy to clipboard operation
lychee copied to clipboard

test: fix assertion in fragment checks

Open MichaIng opened this issue 6 months ago • 1 comments

The URLs in the test Markdown file were switched to the main repo, but the assertions were forgotten: #1733

MichaIng avatar Jun 20 '25 16:06 MichaIng

#1727 caused a change in the output. I will try to fix it.

EDIT: Okay no sure what is wrong with that one:

  • TEST.md contains 12 URIs
  • The 2 exclusions are the two email addresses, since --include-mail is not passed.
  • Since fragments checking is not enabled for that test, the #awesome URL succeeds.
  • ... looks all as expected.

Maybe makes sense to print expected and actual output of that test in case of a failure, but I don't know how to do that.

Also, is there a way to finish all tests, even if one fails? When #1733 and later #1727 were merged, in both cases, the now failing test was skipped, since the prior fragment test failed. So it is not clearly visible which commit caused the failure. Since the now failing test does not enable fragments, and tests in #1733 succeeded days after the last one in #1727 was running, I am sure #1727 introduced it, in combination with another commit done within the last week. But better if always all tests run, to see such for sure.

MichaIng avatar Jun 20 '25 16:06 MichaIng

I did some local testing and figured that it passed so I cherry picked it into master because I thought this PR might contain some other commits and changes causing the failure. But in hindsight it was a flaky test. (or maybe the URLs were not available yet?) I've reran the tests on this PR and they passed. Thanks for the PR :+1:

thomas-zahner avatar Jun 25 '25 09:06 thomas-zahner

Thanks for fixing master @MichaIng and @thomas-zahner. You folks rock. 😄

mre avatar Jun 25 '25 10:06 mre