Commit Graph

22 Commits

Author SHA1 Message Date
Donald Sharp
b9f3e47f3a tests: Start the ability to mark tests
Add the ability for our topotests to take advantage of pytest `mark`ing.
This effectively allows you to tell pytest to run against certain sets
of tests.  For a demonstration purpose I've added in marks for:
babel
eigrp
ldp
ospf
pim
rip

And setup tests to run against those tests that only test those protocols.

You can run against eigrp tests by running `pytest -k eigrp`
Other combinations are also available based upon simple boolean logic.
Just read the pytest.mark documentation.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-14 20:29:14 -05:00
Martin Winter
3636b6c158
tests: Make ospf convergence predictable by setting if priority
Added OSPF priorities to force a predictable DR/Backup router selection

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2020-11-26 04:10:05 +01:00
whitespace
701a01920e *: reformat python files
We are now using black.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-10-07 17:22:26 -04:00
Martin Winter
737a7c578f
tests: Topotest fixes to skip comparing InterfaceIndex and Internal status in json_cmp
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2020-10-01 21:33:55 +02: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
Donald Sharp
39adeb7617 tests: Reduce ldp-vpls-topo1 run time
Reduce this tests run time from ~76 seconds to ~49 seconds
by decreasing the hello/dead interval timers in ospf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-09-03 10:54:16 -04:00
Mark Stapp
e513ad68d4 tests: add time to ldp vpls testcase
Add some more wait time to an LDP vpls testcase - it seems to have
trouble in the CI sometimes.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-08-11 09:33:39 -04: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
Renato Westphal
c6d345e4a4 topotest: update the LDP VPLS test
The final test case of this topotest wasn't really testing
anything. Do the following changes to fix this:
* Remove "no link-detect" from the zebra configs so that link down
  failures are detected immediately;
* After shutting down the interface between r1 and r2, wait five
  seconds before testing if the pseudowires reconverged through
  the r3 router.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-11-04 13:05:47 -03:00
Renato Westphal
8f4f95e08a tests: remove more topotest backward-compatibility cruft
This isn't necessary anymore since topotest was integrated into
the FRR repo.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-23 09:38:05 -03:00
Martin Winter
97ec2683d4 tests: test_ldp_vpls_topo1 Remove some inconsistent labels in check
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2019-04-04 18:44:13 -03:00
Donald Sharp
9c463972e7 topotests: Add a bit more useful debugging to ldp-vpls-topo1
When something goes wrong with this test, having these turned
on will help us debug zebra processing a bit better in the
future without having to modify anything else.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-03-27 16:13:58 -04:00
Rafael Zalamena
96984a17a5 ldp-vpls-topo1: remove duplicated code and sleep
Use the new standardized code for router output compare and remove a
code sleep.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Lou Berger
2b0e32967c *: convert startup logs to use per node directories also have startup and running log files match
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
623afc9d83 ldp-vpls-topo1: support new OSPF JSON format
Support the new OSPF JSON output format for `show ip ospf neighbor
json` introduced in FRR's PR 1723.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:13 -05:00
Martin Winter
4649eef8e1 ldp-vpls-topo1: new format for ospf neighbor json
Accept new format in ospf neighbor json output in addition to
old version. New format was introduced with PR1659

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:13 -05:00
Martin Winter
3d6c6f01ac ldp-vpls-topo1: Allow ospf neighbor json command with list (new) and dict (old)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Rafael Zalamena
968afc2848 ldp-vpls-topo1: fix a json_cmp result assert
Use the 'right' assert to show more detailed failure report and remove
a unused variable.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
333139b22e ldp_vpls_topo1: set an error instead of exit
It will have the same effect and code will not have to be repeated since
all functions must call `routers_have_failure()`.
2018-11-27 20:22:12 -05:00
Renato Westphal
f13a242c76 ldp_vpls_topo1: don't use pytest.mark.skipif
This feature from pytest can not be used to detect runtime errors.

Also, remove test_router_running() since all tests should actually check
if all daemons are up and running.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Renato Westphal
c4057baab7 ldp_vpls_topo1: skip all tests on stable/2.0
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Renato Westphal
6fcaea2bc6 ldp_vpls_topo1: add new topology for ldp pseudowires
This is a very simple topology for testing LDP pseudowires.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-11-27 20:22:12 -05:00