Repository navigation
test(dispatch): keep the KNOWN_DEGRADED copies in step and drop stale stand-ins (#2229) - #2239
Merged
Merged
Conversation
… stand-ins (#2229) Problem: examples/generators/dispatch.py and DispatchRegistryTests each keep a KNOWN_DEGRADED table, nothing held them together, and their reason strings had drifted. The NGAP comment claimed CI omits [NGAP], and the probe still sent zero-octet IPX stand-ins and two HIP parameters. Fix: align the reason strings, reword the NGAP comment, build both IPX payloads with bytes(IPX()) and send one HIP parameter. IPX now dispatches as Ethernet:IPX and Ethernet:IPv4:IPX, and HIP still reaches HIPv2. Test: test_known_degraded_matches_the_generator compares labels, fragments and reasons of the two copies; it fails on origin/main's diverging reasons.
Owner
Author
|
Review: GOOD TO GO at
|
Owner
Author
|
Ready to merge at
|
Contributor
|
Coverage: 91.56% (unit tier, Python 3.15,
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.
make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
test— tests onlyDescription
Closes #2229.
DispatchRegistryTests.test_known_degraded_matches_the_generatorreadsexamples/generators/dispatch.py's table through the existing_load_generator. It asserts the twoKNOWN_DEGRADEDcopies agree on labels, fragments and reasons. The generator's reason strings are aligned to the test's.[NGAP]and reports the malformed-PDU reason. A local run withoutpycratereports the missing-dependency reason.bytes(IPX()), and the HIP case sends oneParameter.SEQ.link/Novell_Inc_0x8137:Ethernet:IPX:UnknownbecomesEthernet:IPX.internet/IPX_in_IP: becomesEthernet:IPv4:IPX.Ethernet:IPv6:HIPv2:TCP.origin/main's generator, 2 failed ("the fragment or reason recorded here differs from examples/generators/dispatch.py"). Changing one fragment fails it again.test_dispatch_registry_unitgives 8 passed. The generator project tests, tier guard and docstring contract give 145 passed.