Repository navigation
test(integration): skip upstream-pinned PCAP-NG counts on a stand-in fixture (#1478) - #1480
Merged
Merged
Conversation
Owner
Author
|
Verdict: GOOD TO GO at
Not audited, out of scope: other downloaded fixtures, such as |
…fixture (#1478) When the download of many_interfaces.pcapng or dhcp_big_endian.pcapng fails, examples/generators/pcapng.py writes a synthesised stand-in under the same name, and assertions pinned to the upstream bytes went red on a network blip. - tests/_support.py: stand_in_reason() compares a capture's SHA-256 against the digest the generator already pins in FIXTURES; skip_if_stand_in() skips the test or subtest when they differ. - test_pcapng_end_to_end.py: guard the many_interfaces.pcapng counts; the dhcp_big_endian stand-in matches upstream's inventory and stays asserted. - test_pcapng_unit.py: guard the big-endian SHB option layout check. - test_support_helpers.py: cover the helpers, including a simulated failed download through the real generator.
Owner
Author
|
Verdict carried to |
JarryShaw
force-pushed
the
fix/1478-stand-in-fixture-counts
branch
from
October 9, 2026 14:06
34bd7b1 to
2167d38
Compare
Contributor
|
Coverage: 89.55% (unit tier, Python 3.14,
Per-file detail: the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please follow the guide below
You will be asked some questions, please read them carefully and answer honestly
Put an
xinto all the boxes [ ] relevant to your pull request (like that [x])Use Preview tab to see how your pull request will actually look like
Searched for similar pull requests
Followed the coding style (
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeAdded a changelog entry under
docs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible — N/A — centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657What is the purpose of your pull request?
Tick the commit type your subject line carries.
fix— corrects a defectfeat— adds a featureperf— changes performance, not behaviourrefactor— changes neither behaviour nor performancetest— tests onlydocs— documentation onlyci— workflows or build toolingrelease— bumps the version or rolls up a distributionchore— anything elseDescription of your pull request and other information
Closes #1478. When a download fails,
examples/generators/pcapng.pywrites a synthesised stand-in under the upstream name, so the counts pinned to upstream went red on a network blip (job 113845878658).Design. The generator already pins each download's SHA-256 in
FIXTURES. That pinned digest is the marker:tests/_support.stand_in_reason()hashes the capture on disk and compares. A sidecar file could get out of step with the bytes it describes; this check can't.skip_if_stand_in()skips only the assertions pinned to upstream, so they still run whenever the real file is present. No stand-in numbers are hard-coded.Scope. Only
pcapng.pydownloads. Of its two downloads:many_interfaces.pcapng: guarded at the three failing sites (:70,:88,:96onmain).dhcp_big_endian.pcapng: its stand-in matches upstream's 4-frame inventory, so the integration test still asserts it. The SHB option layout check intest_pcapng_unit.pyis pinned to upstream ([9, 12, 15, 7, 0]against the stand-in's[37, 9, 22, 29, 0]), so that check is guarded too.Proof (stand-ins written by
generate()with_downloadpatched to raiseURLError):main's tests on the stand-ins: 4 failed. These are the three from the issue plus the unit check.StandInReasonTestscover the helpers, including a simulated failed download through the real generator.tests/project: 419 passed, 1 skipped.