]>
git.proxmox.com Git - mirror_frr.git/blob - tests/topotests/bgp_l3vpn_to_bgp_direct/test_bgp_l3vpn_to_bgp_direct.py
2 # SPDX-License-Identifier: ISC
5 # Part of NetDEF Topology Tests
7 # Copyright (c) 2018, LabN Consulting, L.L.C.
8 # Authored by Lou Berger <lberger@labn.net>
15 sys
.path
.append(os
.path
.join(os
.path
.dirname(os
.path
.realpath(__file__
)), ".."))
17 from lib
.ltemplate
import *
19 pytestmark
= [pytest
.mark
.bgpd
, pytest
.mark
.ospfd
]
22 def test_adjacencies():
24 # For debugging, uncomment the next line
25 # CliOnFail = 'tgen.mininet_cli'
26 CheckFunc
= "ltemplateVersionCheck('3.1')"
27 # uncomment next line to start cli *before* script is run
28 # CheckFunc = 'ltemplateVersionCheck(\'3.1\', cli=True)'
29 ltemplateTest("scripts/adjacencies.py", False, CliOnFail
, CheckFunc
)
32 def test_add_routes():
34 # For debugging, uncomment the next line
35 # CliOnFail = 'tgen.mininet_cli'
36 CheckFunc
= "ltemplateVersionCheck('3.1')"
37 # uncomment next line to start cli *before* script is run
38 # CheckFunc = 'ltemplateVersionCheck(\'3.1\', cli=True)'
39 ltemplateTest("scripts/add_routes.py", False, CliOnFail
, CheckFunc
)
42 def test_check_routes():
44 # For debugging, uncomment the next line
45 # CliOnFail = 'tgen.mininet_cli'
46 CheckFunc
= "ltemplateVersionCheck('3.1')"
47 # uncomment next line to start cli *before* script is run
48 # CheckFunc = 'ltemplateVersionCheck(\'3.1\', cli=True)'
49 ltemplateTest("scripts/check_routes.py", False, CliOnFail
, CheckFunc
)
52 def test_cleanup_all():
54 # For debugging, uncomment the next line
55 # CliOnFail = 'tgen.mininet_cli'
56 CheckFunc
= "ltemplateVersionCheck('3.1')"
57 # uncomment next line to start cli *before* script is run
58 # CheckFunc = 'ltemplateVersionCheck(\'3.1\', cli=True)'
59 ltemplateTest("scripts/cleanup_all.py", False, CliOnFail
, CheckFunc
)
62 if __name__
== "__main__":
63 retval
= pytest
.main(["-s"])