Commit 78785570 authored by Matous Holinka's avatar Matous Holinka
Browse files

mh-bgp: test-suite was added

parent 1e59551c
......@@ -11,40 +11,40 @@ import tests.kernel as tk
sys.path.pop(0)
_LIMIT = 60
LIMIT = 60
EXPECTED_DEVICES = (
"m11",
"m12",
"m13",
"m14",
"m21",
"m22",
"m23",
"m24",
"m31",
"m32",
"m33",
"m34",
"m41",
"m42",
"m43",
"m44",
)
@pytest.mark.skipif(tk.cf.save == False, reason="mode: save")
def test_wait():
"""Wait until the time (limit) runs out"""
tk.wait(_LIMIT)
@pytest.mark.parametrize(
"expected_device",
[
"m11",
"m12",
"m13",
"m14",
"m21",
"m22",
"m23",
"m24",
"m31",
"m32",
"m33",
"m34",
"m41",
"m42",
"m43",
"m44",
],
)
def test_krt_routes(expected_device):
"""
# Basic test case:
1. Check the krt tables in a while
2. Check the status of specific protocols
"""
tk.test_krt_routes("krt", expected_device, "bgp")
tk.wait(LIMIT)
@pytest.mark.skipif(tk.cf.save == False, reason="mode: save")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_save_krt_tables(exp_devs):
tk.save_krt_routes("krt", exp_devs)
@pytest.mark.skipif(tk.cf.save == True, reason="mode: check")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_check_krt_routes_timeout(exp_devs):
tk.check_krt_routes_timeout("krt", exp_devs)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment