Skip to content

junos_commit_check: add IPv6 prefix normalization tests#173

Merged
dhalperi merged 1 commit into
mainfrom
junos-commit-check-ipv6
May 6, 2026
Merged

junos_commit_check: add IPv6 prefix normalization tests#173
dhalperi merged 1 commit into
mainfrom
junos-commit-check-ipv6

Conversation

@dhalperi
Copy link
Copy Markdown
Member

@dhalperi dhalperi commented May 6, 2026

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.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.50%. Comparing base (d548999) to head (bf79a2e).

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           
Flag Coverage Δ
unittests 83.50% <ø> (ø)

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.

@dhalperi dhalperi force-pushed the junos-commit-check-ipv6 branch 2 times, most recently from 7c6ccaa to 1e984cb Compare May 6, 2026 02:46
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.
```
@dhalperi dhalperi force-pushed the junos-commit-check-ipv6 branch from 1e984cb to bf79a2e Compare May 6, 2026 03:26
@dhalperi dhalperi merged commit f17df9e into main May 6, 2026
110 checks passed
@dhalperi dhalperi deleted the junos-commit-check-ipv6 branch May 6, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants