Skip to content

chore: cover multiple VRFs for unit test#3640

Open
0xzrf wants to merge 1 commit intomalbeclabs:mainfrom
0xzrf:ext_unk_peer_rem_tests
Open

chore: cover multiple VRFs for unit test#3640
0xzrf wants to merge 1 commit intomalbeclabs:mainfrom
0xzrf:ext_unk_peer_rem_tests

Conversation

@0xzrf
Copy link
Copy Markdown

@0xzrf 0xzrf commented May 1, 2026

Summary of Changes

  • Describe what changed in the PR
    Updated render_peer_removal_successful in controlplane/controller/internal/controller/render_test.go to cover multi-VRF scenarios by switching UnicastVrfs from [1][1, 2] and assigning tunnels across VRFs (keeping tunnel 500 in VRF1; moving 501/502 to VRF2).
    Updated the golden fixture controlplane/controller/internal/controller/fixtures/unknown.peer.removal.tmpl to match the expected rendered output for multi-VRF peer removal (adds vrf2 routing/config sections, moves tunnel VRF assignments, and ensures unknown-peer no neighbor cleanup is rendered under each VRF).

  • Explain why the change is necessary
    quoting from this issue:

    Today, this is only tested with one VRF. A regression in multi-VRF unknown peer removal would go undetected by the unit test suite. The existing multi.vrf.tunnel.tmpl fixture tests multi-VRF rendering but uses UnknownBgpPeers: nil, so it doesn't cover this case.

  • Is there supporting documentation or external resources that explain the change? No

  • Is a CHANGELOG.md update needed? No

Testing Verification

  • Ran the focused unit subtest:
go test ./controlplane/controller/internal/controller -run '^TestRenderConfig$/render_peer_removal_successful$' -v

Closes #3633

@0xzrf
Copy link
Copy Markdown
Author

0xzrf commented May 2, 2026

hey @nikw9944

Can you review this PR?
Happy to make changes if needed
Thanks

@0xzrf 0xzrf force-pushed the ext_unk_peer_rem_tests branch from 9478ae2 to aa5d34d Compare May 2, 2026 19:50
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.

controller: extend unknown peer removal unit test to cover multi-VRF

1 participant