junos_commit_check: add IPv6 prefix normalization tests#173
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #173 +/- ##
=======================================
Coverage 83.50% 83.50%
=======================================
Files 87 87
Lines 4165 4165
=======================================
Hits 3478 3478
Misses 687 687
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
7c6ccaa to
1e984cb
Compare
Add IPv6 variants of all commit check tests. Junos applies the same prefix normalization enforcement (rejecting host bits) to IPv6 prefixes in most inet6 contexts: static/aggregate/generate routes, OSPFv3 area-range, and condition if-route-exists with inet6.0 table. Notable finding: unlike IPv4 firewall, Junos does NOT reject host bits in `firewall family inet6 filter` destination-address or next-ip6. These are placed in the "accepts" category. Also adds IPv6 "accepts" cases: prefix-list, route-filter, interface address, BGP allow, and the firewall inet6 contexts above. The IPv6 "rejects" cases are sickbayed as xfail pending batfish/batfish#9934 (Batfish doesn't yet check IPv6 normalization). Also fixes the commit check framework to use `send_command` with `expect_string` instead of `send_command_timing`, and to distinguish indeterminate results (timeout, empty output, exceptions) from definitive rejections — preventing silent false passes. All tests validated on vJunos-router 25.4R1.12 via containerlab on EC2. ---- Prompt: ``` In a session earlier today, we added support for doing commit checks on Juniper and built a lab for IPv4 prefixes in various contexts. Let's also add ipv6 variants of these tests to both the commit checks and the junos_commit_checks lab. ```
1e984cb to
bf79a2e
Compare
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.
Add IPv6 variants of all commit check tests. Junos applies the same
prefix normalization enforcement (rejecting host bits) to IPv6 prefixes
in most inet6 contexts: static/aggregate/generate routes, OSPFv3
area-range, and condition if-route-exists with inet6.0 table.
Notable finding: unlike IPv4 firewall, Junos does NOT reject host bits
in
firewall family inet6 filterdestination-address or next-ip6. Theseare placed in the "accepts" category.
Also adds IPv6 "accepts" cases: prefix-list, route-filter, interface
address, BGP allow, and the firewall inet6 contexts above.
The IPv6 "rejects" cases are sickbayed as xfail pending
batfish/batfish#9934 (Batfish doesn't yet check IPv6 normalization).
Also fixes the commit check framework to use
send_commandwithexpect_stringinstead ofsend_command_timing, and to distinguishindeterminate results (timeout, empty output, exceptions) from definitive
rejections — preventing silent false passes.
All tests validated on vJunos-router 25.4R1.12 via containerlab on EC2.