1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
#!/usr/bin/env python
# SPDX-License-Identifier: ISC
#
# Part of NetDEF Topology Tests
#
# Copyright (c) 2018, LabN Consulting, L.L.C.
# Authored by Lou Berger <lberger@labn.net>
#
import os
import sys
import pytest
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), ".."))
from lib.ltemplate import *
pytestmark = [pytest.mark.bgpd, pytest.mark.ospfd]
def test_add_routes():
CliOnFail = None
# For debugging, uncomment the next line
# CliOnFail = 'tgen.mininet_cli'
CheckFunc = "ltemplateVersionCheck('3.1')"
# uncomment next line to start cli *before* script is run
# CheckFunc = 'ltemplateVersionCheck(\'3.1\', cli=True)'
ltemplateTest("scripts/add_routes.py", False, CliOnFail, CheckFunc)
def test_adjacencies():
CliOnFail = None
# For debugging, uncomment the next line
# CliOnFail = 'tgen.mininet_cli'
CheckFunc = "ltemplateVersionCheck('3.1')"
# uncomment next line to start cli *before* script is run
# CheckFunc = 'ltemplateVersionCheck(\'3.1\', cli=True)'
ltemplateTest("scripts/adjacencies.py", False, CliOnFail, CheckFunc)
def test_check_routes():
CliOnFail = None
# For debugging, uncomment the next line
# CliOnFail = 'tgen.mininet_cli'
CheckFunc = "ltemplateVersionCheck('3.1')"
# uncomment next line to start cli *before* script is run
# CheckFunc = 'ltemplateVersionCheck(\'3.1\', cli=True)'
ltemplateTest("scripts/check_routes.py", False, CliOnFail, CheckFunc)
def test_check_close():
CliOnFail = None
# For debugging, uncomment the next line
# CliOnFail = 'tgen.mininet_cli'
CheckFunc = "ltemplateVersionCheck('3.1')"
# uncomment next line to start cli *before* script is run
# CheckFunc = 'ltemplateVersionCheck(\'3.1\', cli=True)'
ltemplateTest("scripts/check_close.py", False, CliOnFail, CheckFunc)
def test_check_timeout():
CliOnFail = None
# For debugging, uncomment the next line
# CliOnFail = 'tgen.mininet_cli'
CheckFunc = "ltemplateVersionCheck('3.1')"
# uncomment next line to start cli *before* script is run
# CheckFunc = 'ltemplateVersionCheck(\'3.1\', cli=True)'
ltemplateTest("scripts/check_timeout.py", False, CliOnFail, CheckFunc)
def test_cleanup_all():
CliOnFail = None
# For debugging, uncomment the next line
# CliOnFail = 'tgen.mininet_cli'
CheckFunc = "ltemplateVersionCheck('3.1')"
# uncomment next line to start cli *before* script is run
# CheckFunc = 'ltemplateVersionCheck(\'3.1\', cli=True)'
ltemplateTest("scripts/cleanup_all.py", False, CliOnFail, CheckFunc)
if __name__ == "__main__":
retval = pytest.main(["-s"])
sys.exit(retval)
|