test: add BGP speaker unit and end-to-end coverage - #7241
Merged
Conversation
Signed-off-by: Zujian Zhang <zhangzujian.7@gmail.com>
zhangzujian
force-pushed
the
test/bgp-speaker-tests
branch
from
August 15, 2026 15:31
89adee2 to
fc625bb
Compare
Coverage Report for CI Build 31926766507Coverage increased (+0.3%) to 32.744%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions4 previously-covered lines in 2 files lost coverage.
Coverage Stats
💛 - Coveralls |
Signed-off-by: Zujian Zhang <zhangzujian.7@gmail.com>
Signed-off-by: Zujian Zhang <zhangzujian.7@gmail.com>
Signed-off-by: Zujian Zhang <zhangzujian.7@gmail.com>
zhangzujian
force-pushed
the
test/bgp-speaker-tests
branch
from
August 16, 2026 03:53
6c0e70d to
d418cc2
Compare
Signed-off-by: Zujian Zhang <zhangzujian.7@gmail.com>
zhangzujian
force-pushed
the
test/bgp-speaker-tests
branch
from
August 16, 2026 04:29
6c4d45e to
3b88677
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.
What this PR does
Adds focused unit and end-to-end coverage for the classic
kube-ovn-speakerBGP implementation.Unit tests
End-to-end tests
Adds a serial IPv4 Ginkgo suite using the existing Kind + containerlab + FRR topology. It verifies:
/32is learned from its hosting node with the exact expected nexthop and is withdrawn after Pod deletionovn-defaultbetweenclusterandlocalreconciles exact Pod/CIDR peer+nexthop paths without restarting speakerspeerIdfrom prefix-specific JSON outputWithdrawal checks require the route path to be absent while both BGP sessions remain Established, so session loss or an invalid/stale retained path cannot produce a false pass.
The suite is wired into
e2e-build, a dedicated Make target, and the x86 workflow. Failure artifacts include FRR summary/RIB output, speaker DaemonSet/Pod state and logs, events, audit logs, andkubectl ko log; setup failures upload an explicit unavailable marker when the cluster never becomes usable.Local verification
All local compile, test, and static-check commands ran with
MemoryMax=512M:go test ./pkg/speaker -count=1 -cover(39.9%)go test -race ./pkg/speaker -count=1go vet ./pkg/speakergo test test/e2e/bgp/frr.go test/e2e/bgp/frr_test.go -count=1git diff --checkThe privileged Kind/containerlab E2E and repository
golangci-lintare delegated to GitHub Actions.