Commit Graph

61 Commits

Author SHA1 Message Date
nguggarigoud
ad03ea8ebf tests: Adding lib changes for bgp peer type verification.
Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-07-15 05:28:08 -07:00
Christian Hopps
ed776e38f6
tests: apply KISS to retry fixture
This python fixture was way too complex for what is needed.

Eliminate gratuitous options/over-engineering:

- Change from non-deterministic `wait` and `attempts` to a single
`retry_timeout` value. This is both more deterministic, as well as
what the user should actually be thinking about.

- Use a fixed 2 second pause between executing the wrapped function
rather than a bunch of arbitrary choices of 2, 3 and 4 seconds
spread all over the test code.

- Get rid of the multiple variables for determining what "Positive" and
"Negative" results are. Instead just implement what all the user code
already wants, i.e., boolean False or a str (errormsg) means
"Negative" result otherwise it's a "Positive" result.

- As part of the above the inversion logic is much more comprehensible
in the fixture code (and more correct to boot).

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-06-25 05:33:04 +00:00
Kuldeep Kashyap
3c41ebf8ea tests: Fixing common pylint error for topojson
Issue: There was an error reported by Pylint regarding "expected" keyword:
   Unexpected keyword argument 'expected' in function call (unexpected-keyword-arg)
Fix: We have defined expected keyword in all topojson APIs.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-06-07 22:23:34 -07:00
Martin Winter
0575d5a8f8
Merge pull request #8437 from donaldsharp/verify_bgp_community_no_sleep
tests: Do not sleep(5) when verifying bgp communities
2021-04-15 14:03:37 +02:00
Donald Sharp
9e7fd5ecbd tests: Do not sleep(5) when verifying bgp communities
There are better ways of ensuring that the remote side
has your change instead of sleeping

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-09 12:02:18 -04:00
Donald Sharp
0b25370e95 tests: More black fixups
Just another round of fixups found by running black on the code

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-09 08:35:05 -04:00
Kuldeep Kashyap
2268cf50d5 tests: Fix for BGP_GR test failures
Few tests were failing in BGP-GR intermittently. Fixing the failures.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-04-05 00:15:40 -07:00
Kuldeep Kashyap
53402dbf1e tests: Fix bgp convergence issue mentioned in #8279
1. Enhance verify_bgp_convergence() to solve issue mentioned in #8279

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-03-17 17:43:57 -07:00
Wesley Coakley
23f3a92e34
tests: address coverity / styling issues in topotests
Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2021-03-02 20:44:15 -05:00
Donald Sharp
e1713aa16d tests: Set default timers to 3/10 for bgp using create_router_bgp
Tests were timing out in our test system due to lost packets and
flakiness of the lower end systems.  Just set the timers to 3/10
and give them plenty of time to converge.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-16 08:29:49 -05:00
Martin Winter
90cd28e91a
Merge pull request #6212 from gpnaveen/static_routes
tests: Adding static routing topojson automation suites.
2020-12-22 14:11:37 -08:00
Donald Sharp
29c0ce20ef tests: dict_values are not lists in version 3
While accidently running the topotests with version 3
I keep getting:

TypeError: `dict_values` object does not support indexing..

version 2 of python dict.values() returns a list.
version 3 does not

Write some code to allow both to be handled.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-12-18 19:12:30 -05:00
naveen
88fedaaa7b tests: Adding static routing topojson automation suites.
Adding API's required for EVPN suite.

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
naveen
93792f5dd0 tests: Updated verify_bgp_rib api for multipaths.
verify_bgp_rib is updated in bgp.py file to
handle multi paths.

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
Naveen Guggarigoudar
f8f6dbe9f7 tests: Enhanced the lib bgp.py for nexthop check
1. Enhanced the lib bgp.py for nexthop check

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
naveen
eee0457da7 tests: Enhanced lib by removing unnecessary sleep
1. libs modified are bgp.py and common_config.py

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
naveen
0705f3120d tests: Adding static routing topojson automation suites.
1. Enhanced framework to
a. Verify fib active routes(lib/common_config.py).
b. Verify bgp multi path routes(lib/bgp.py).
c. Create mininet nodes with different names(lib/topojson.py).

4. 12 Test cases of static routing with ibgp.
Test suite execution time is ~30 minutes.

5. 12 Test cases of static routing with ebgp.
Test suite execution time is ~30 minutes.

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
kuldeepkash
3732ea226a tests: Enhanced auto-rd verification as per changes done in #7652
1. As per recent changes done in PR #7652, we have modified the auto-rd verification logic
2. Dev PR link: https://github.com/FRRouting/frr/pull/7652

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
2020-12-08 15:53:20 +00:00
Kuldeep Kashyap
abb229fde3 tests: Enhance libraries to optimize test execution
1. Enhance libraries to optimize test execution as per Donald's suggestion

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-11-12 11:45:12 +00:00
Mark Stapp
61196140a6 tests: improve unicode handling
Support more of the string/unicode interactions in various
topotests.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-09-26 15:40:00 -04:00
Mark Stapp
e5f0ed147b tests: use .items instead of .iteritems in topotests
Avoid py2-only .iteritems() api.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-09-18 15:55:23 -04:00
Kuldeep Kashyap
c3794eb210 tests: Add bgp_route_aggregation test suite
1. Added 2 tests to verify bgp route aggregation using summary-only and
   as-set commands
2. Execution time is ~90 sec

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-09-18 14:11:58 +00:00
Donald Sharp
9fa352cfb7 tests: Speed up topotests by being more aggressive
We have a bunch of tests that wait *then* check a command for success/failure.
Modify the tests to check *first* then to wait.  This reduces test
run times on my system by ~1400 seconds for a full run.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-09-11 20:20:42 -04:00
Kuldeep Kashyap
bc0a514728 tests: Add f/w support for bgp_vrf_dynamic_route_leak tests automation
1. Adding f/w support for bgp_vrf_dynamic_route_leak tests automation

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-09-01 15:48:10 +00:00
Kuldeep Kashyap
19f4da0bec tests: Add new tests to bgp-basic-functionality-topo1
1. Added new tests to bgp-basic-functionality-topo1
3. Execution time increased by 55 sec

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-08-28 12:24:20 +00:00
Kuldeep Kashyap
1b66072ce0 tests: Adding test suites evpn_type5_test_topo1
1. Added 15 test cases to test evpn type5 functionality
2. Total execution time is ~9 mins

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-07-22 09:04:16 +00:00
Kuldeep Kashyap
3c334c3915 tests: Adding framework support for EVPN-Type5 automation
1. Added APIs to create evpn related config.
2. Added APIs to verify evpn config and routes.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-07-22 06:12:55 +00:00
Kuldeep Kashyap
f6f20a77e8 tests: [topojson] Increase BGP convergence wait time
1. Increasing BGP convergence wait time to overcome Ubuntu 16.04 arm8 box, as
bgp neighorship is taking more time in this particular testbed.
2. Debugged bgp-ecmp-topo2 failures and here also it seems to be bgp convergence
issue, doing some enhancement in scripts to handle it

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-07-14 13:09:06 +00:00
Donald Sharp
eb94db103c
Merge pull request #6703 from mjstapp/fix_bgp_30_secs
tests: print actual time spent waiting for bgp convergence
2020-07-09 20:29:08 -04:00
Mark Stapp
8b547a6dab test: use ipaddress module instead of ipaddr
Use the standard ipaddress module instead of installing 'ipaddr',
which may be deprecated now.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-09 12:32:10 -04:00
Mark Stapp
526d442fe4 tests: print actual time spent waiting for bgp convergence
Stop printing hard-coded 30 seconds in a couple of places in
bgp.py in the topojson infra - print the actual time
spent waiting.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-09 09:51:16 -04:00
Mark Stapp
58923d880f tests: fix short timeout in lib/bgp.py
Another short timeout for bgp - make the
verify_bgp_convergence_from_running_config() api use the same
generous timeout as verify_bgp_convergence()

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-07 08:25:01 -04:00
Kuldeep Kashyap
6fef4969ef tests: Add bgp_recursive_route_ebgp_multi_hop test suite
1. Added 7 test cases to verify bgp recursive nexthop and ebgp multi-hop functionality
2. Added framework support to automate these test cases
3. Total execution time is ~5 mins

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-07-06 10:05:53 +00:00
Donald Sharp
6a6f3d5a60 tests: After clear give it more than 90 seconds to come up
Error Message seen:
2020-06-11 14:00:35,288 ERROR: assert failed at "test_ebgp_ecmp_topo2/test_ecmp_after_clear_bgp[redist_static]": Testcase test_ecmp_after_clear_bgp[redist_static] : Failed
   Error: TIMEOUT!! BGP is not converged in 30 seconds for router r3
assert 'TIMEOUT!! BGP is not converged in 30 seconds for router r3' is True

if a retry for a failed connection is 120 seconds we should wait slightly
longer than a retry session, which this clear test was not doing.
Especially since we know our topotests are lossy on data under load.

Apparently I changed this earlier to 90 seconds, but a retry window
is 120.  Not sure wtf I was thinking

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-11 09:53:05 -04:00
Mark Stapp
bfab324148 tests: include lib/bgp.py convergence timeout to 130
The convergence timeout in lib/bgp.py was something like 40 secs;
that's not really long enough for the CI. Raise the timeout to
40 x 3 secs.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-10 08:14:08 -04:00
Kuldeep Kashyap
f8d572e88f tests: Framework support for BGP Multi-VRF automation
1. Added/Enhanced APIs to created bgp multi-vrf config and to
verify config/functionality

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-05-20 04:48:47 +00:00
Kuldeep Kashyap
35ba1e3db8 tests: Adding test suite bgp_gr_functionality_topo1
1. Test suite has 25 test cases to verify BGP-graceful-restart functionality
2. Execution time is ~21 Mins

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-05-04 18:52:50 +00:00
Kuldeep Kashyap
a5a52d6608 tests: Add library support for BGP-Graceful-Restart automation
1. Adding APIs to common_config.py to support BGP-Graceful-Restart automation
2. Adding APIs to create BGP-GR config to bgp.py
3. Adding verification API for BGP-GR functionality

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-05-04 17:15:55 +00:00
Donald Sharp
62282e8379 bgpd,tests: Modify import-check to require underlying prefixes to exist
Modify the import-check command to require the underlying prefix
to exist in the rib.  General consensus is that this is the correct
behavior.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-04-28 15:57:53 -04:00
Donatas Abraitis
c7688a6943 tests: Enable rfc8212 by default except datacenter profile
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-04-14 16:01:46 +03:00
Kuldeep Kashyap
089f79edd4 tests: Adding new test suite bgp_as_allow_in
1. Added 5 test cases to verify BGP AS-allow-in behavior in FRR
2. Enhanced framework to support BGP AS-allow-in config(lib/bgp.py)
3. Added API in bgp.py to verify BGP RIB table(lib/bgp.py)

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-04-09 09:10:21 +00:00
Kuldeep Kashyap
38c3547ac8 tests: Adding new test suite bgp_communities_topo1
1. Added 1 test case to verify NO-ADVERTISE Community functionality
2. Enhanced bgp.py to exclude routers from verification, if doesn't have bgp config

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-04-08 12:27:23 +00:00
Kuldeep Kashyap
9d450273df tests: Adding new test suite bgp_as_allow_in
1. Added 5 test cases to verify BGP AS-allow-in behavior in FRR
2. Enhanced framework to support BGP AS-allow-in config(lib/bgp.py)
3. Added API in bgp.py to verify BGP RIB table(lib/bgp.py)

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-04-08 12:21:26 +00:00
reformat
787e762445 tests: Run python formatter (black) for topotests
Mostly ' => ", whitespace changes.

Using https://github.com/psf/black

Signed-off-by: reformat <reformat@nobody.nobody>
2020-04-03 19:41:28 +03:00
Donatas Abraitis
0a9fe278f6 tests: Remove/change JSON attributes for show bgp ... json
This is related to some attributes changes: aspath, med, localPref.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-04-01 23:59:45 +03:00
Kuldeep Kashyap
af9c65d44a tests: Optimize bgp-basic-functionality-topo1 test suite
1. Used aggresive values to verify keepalive and holddown timers functionality
2. Modified variable name in lib/bgp.py

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-03-16 19:55:14 +00:00
Kuldeep Kashyap
b9f80297c8 tests: Modified scripts to optimize execution time for route-map test suite
1. Modified scripts to optimize execution time for route-map test suite
2. Removed unnecessary print statements from /lib/bgp.py

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-02-26 21:02:09 +00:00
Kuldeep Kashyap
c7bb8a05ff tests: Enhance BGP Path attribute APIs
Modified affacted APIs to supported BGP Path attributes modification
and verification

Signed-off-by: Kuldeep Kashyap <kuldeepkas@gmail.com>
2019-10-21 09:47:00 +05:30
Ashish Pant
06e693f11b tests: Update bgp api for community and aggregate address
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Add support for not sending community data in bgp and update
aggregate address configuration code
2019-10-17 09:17:03 +05:30
Ashish Pant
915bed88d8 tests: Add topojson route-map for nexthop
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Add route-map option for ipv6 nexthop

Fix typo in bgp configuration
2019-10-03 07:15:20 +05:30