]> git.proxmox.com Git - mirror_frr.git/blob - tests/topotests/bgp_l3vpn_to_bgp_direct/test_bgp_l3vpn_to_bgp_direct.py
*: auto-convert to SPDX License IDs
[mirror_frr.git] / tests / topotests / bgp_l3vpn_to_bgp_direct / test_bgp_l3vpn_to_bgp_direct.py
1 #!/usr/bin/env python
2 # SPDX-License-Identifier: ISC
3
4 #
5 # Part of NetDEF Topology Tests
6 #
7 # Copyright (c) 2018, LabN Consulting, L.L.C.
8 # Authored by Lou Berger <lberger@labn.net>
9 #
10
11 import os
12 import sys
13 import pytest
14
15 sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), ".."))
16
17 from lib.ltemplate import *
18
19 pytestmark = [pytest.mark.bgpd, pytest.mark.ospfd]
20
21
22 def test_adjacencies():
23 CliOnFail = None
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)
30
31
32 def test_add_routes():
33 CliOnFail = None
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)
40
41
42 def test_check_routes():
43 CliOnFail = None
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)
50
51
52 def test_cleanup_all():
53 CliOnFail = None
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)
60
61
62 if __name__ == "__main__":
63 retval = pytest.main(["-s"])
64 sys.exit(retval)