-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
E2E: add test for the unnumbered BGP peering
The test requires point-to-point connection so we cannot use any existing infra peer. Therefore a new peer (docker container) runs with no network, and point-to-point connections are created using `sudo ip` commands. There are three specs ``` Unnumbered BGP session is established and routes are verified iBGP Unnumbered BGP session is established and routes are verified eBGP Unnumbered eBGP with BFD peering with native config should be validated ``` A new checking route function is added that executes directly on container `ip {-4,-6} --json ip route show proto bgp dev net0` command it returns a `map[netip.Prefix]map[netip.Addr]`. The use of netip.{prefix,addr} allows direct comparison and no extra loop logic is needed. The output is also more clear when fails, for example ``` Unexpected error: <*errors.errorString | 0xc000069780>: want map[2.2.1.0/24:map[fe80::b4d8:92ff:fe73:1c5a:{}] ... got map[2.2.2.0/24:map[fe80::b4d8:92ff:fe73:1c5a:{}] ... diff map[netip.Prefix]map[netip.Addr]struct{}{ - s"2.2.1.0/24": {s"fe80::b4d8:92ff:fe73:1c5a": {}}, + s"2.2.2.0/24": {s"fe80::b4d8:92ff:fe73:1c5a": {}}, } ``` The test is implemented in way that parallel run is allowed (-p in ginkgo), in case we want to start run e2e in parallel. Signed-off-by: karampok <karampok@gmail.com>
- Loading branch information
Showing
8 changed files
with
570 additions
and
115 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.