Commit 50daef40 authored by Matous Holinka's avatar Matous Holinka

mh-bird-tables-patches: modified test-case-file has been applied to the next testing cases

parent 8fc64348
import os
import sys
import pickle
import pytest
from inspect import getsourcefile
import tests.kernel as tk
import tests.config as cf
LIMIT = 60
EXPECTED_DEVICES = (
......@@ -27,12 +25,31 @@ EXPECTED_DEVICES = (
)
@pytest.mark.skipif(tk.cf.save == False, reason="mode: save")
@pytest.mark.skipif(cf.save == False, reason="mode: save")
def test_wait():
"""Wait until the time (limit) runs out"""
tk.wait(LIMIT)
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_tables(exp_devs):
tk.test_krt_routes("krt", exp_devs)
def test_krt_routes_ipv4(exp_devs: str):
"""IPv4: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt4", exp_devs, "IPv4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv6(exp_devs: str):
"""IPv6: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt6", exp_devs, "IPv6")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv4(exp_devs: str):
"""IPv4: get the content of BIRD tables and check it"""
tk.test_bird_routes("master4", exp_devs, "master4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv6(exp_devs: str):
"""IPv6: get the content of BIRD tables and check it"""
tk.test_bird_routes("master6", exp_devs, "master6")
import os
import sys
import pickle
import pytest
from inspect import getsourcefile
import tests.kernel as tk
import tests.config as cf
LIMIT = 60
EXPECTED_DEVICES = (
......@@ -27,17 +25,31 @@ EXPECTED_DEVICES = (
)
@pytest.mark.skipif(tk.cf.save == False, reason="mode: save")
@pytest.mark.skipif(cf.save == False, reason="mode: save")
def test_wait():
"""Wait until the time (limit) runs out"""
tk.wait(LIMIT)
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_tables(exp_devs):
tk.test_krt_routes("krt", exp_devs)
def test_krt_routes_ipv4(exp_devs: str):
"""IPv4: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt4", exp_devs, "IPv4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv6(exp_devs: str):
"""IPv6: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt6", exp_devs, "IPv6")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv4(exp_devs: str):
"""IPv4: get the content of BIRD tables and check it"""
tk.test_bird_routes("master4", exp_devs, "master4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes(exp_devs):
tk.test_bird_routes("bird", exp_devs)
def test_bird_routes_ipv6(exp_devs: str):
"""IPv6: get the content of BIRD tables and check it"""
tk.test_bird_routes("master6", exp_devs, "master6")
import os
import sys
import pickle
import pytest
from inspect import getsourcefile
import tests.kernel as tk
import tests.config as cf
LIMIT = 60
EXPECTED_DEVICES = (
......@@ -27,12 +25,31 @@ EXPECTED_DEVICES = (
)
@pytest.mark.skipif(tk.cf.save == False, reason="mode: save")
@pytest.mark.skipif(cf.save == False, reason="mode: save")
def test_wait():
"""Wait until the time (limit) runs out"""
tk.wait(LIMIT)
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_tables(exp_devs):
tk.test_krt_routes("krt", exp_devs)
def test_krt_routes_ipv4(exp_devs: str):
"""IPv4: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt4", exp_devs, "IPv4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv6(exp_devs: str):
"""IPv6: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt6", exp_devs, "IPv6")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv4(exp_devs: str):
"""IPv4: get the content of BIRD tables and check it"""
tk.test_bird_routes("master4", exp_devs, "master4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv6(exp_devs: str):
"""IPv6: get the content of BIRD tables and check it"""
tk.test_bird_routes("master6", exp_devs, "master6")
import pytest
import tests.kernel as tk
import tests.config as cf
LIMIT = 60
EXPECTED_DEVICES = ("m1", "m2", "m3", "m4", "m5", "m6", "m7", "m8")
@pytest.mark.skipif(
tk.cf.save == False,
reason="No need to verify time of convergence during the check mode",
)
@pytest.mark.skipif(cf.save == False, reason="mode: save")
def test_wait():
"""Wait until the time (limit) runs out"""
tk.wait(LIMIT)
@pytest.mark.parametrize(
"expected_device", ["m1", "m2", "m3", "m4", "m5", "m6", "m7", "m8",],
)
def test_krt_routes(expected_device):
"""
Test kernel routes:
-------------------
- default parametr :limit: set to the value 60 seconds
"""
tk.test_krt_routes("krt", expected_device)
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv4(exp_devs: str):
"""IPv4: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt4", exp_devs, "IPv4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv6(exp_devs: str):
"""IPv6: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt6", exp_devs, "IPv6")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv4(exp_devs: str):
"""IPv4: get the content of BIRD tables and check it"""
tk.test_bird_routes("master4", exp_devs, "master4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv6(exp_devs: str):
"""IPv6: get the content of BIRD tables and check it"""
tk.test_bird_routes("master6", exp_devs, "master6")
import pytest
import tests.kernel as tk
import tests.config as cf
LIMIT = 60
EXPECTED_DEVICES = ("m1", "m2", "m3", "m4", "m5", "m6", "m7", "m8")
@pytest.mark.skipif(
tk.cf.save == False,
reason="No need to verify time of convergence during the check mode",
)
@pytest.mark.skipif(cf.save == False, reason="mode: save")
def test_wait():
"""Wait until the time (limit) runs out"""
tk.wait(LIMIT)
@pytest.mark.parametrize(
"expected_device", ["m1", "m2", "m3", "m4", "m5", "m6", "m7", "m8"],
)
def test_krt_routes(expected_device):
"""
Test kernel routes:
-------------------
- default parametr :limit: set to the value 60 seconds
"""
tk.test_krt_routes("krt", expected_device)
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv4(exp_devs: str):
"""IPv4: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt4", exp_devs, "IPv4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv6(exp_devs: str):
"""IPv6: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt6", exp_devs, "IPv6")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv4(exp_devs: str):
"""IPv4: get the content of BIRD tables and check it"""
tk.test_bird_routes("master4", exp_devs, "master4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv6(exp_devs: str):
"""IPv6: get the content of BIRD tables and check it"""
tk.test_bird_routes("master6", exp_devs, "master6")
import pytest
import tests.kernel as tk
import tests.config as cf
LIMIT = 60
EXPECTED_DEVICES = ("m1", "m2", "m3", "m4", "m5", "m6", "m7", "m8")
@pytest.mark.skipif(
tk.cf.save == False,
reason="No need to verify time of convergence during the check mode",
)
@pytest.mark.skipif(cf.save == False, reason="mode: save")
def test_wait():
"""Wait until the time (limit) runs out"""
tk.wait(LIMIT)
@pytest.mark.parametrize(
"expected_device", ["m1", "m2", "m3", "m4", "m5", "m6", "m7", "m8"],
)
def test_krt_routes(expected_device):
"""
Test kernel routes:
-------------------
- default parametr :limit: set to the value 60 seconds
"""
tk.test_krt_routes("krt", expected_device)
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv4(exp_devs: str):
"""IPv4: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt4", exp_devs, "IPv4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv6(exp_devs: str):
"""IPv6: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt6", exp_devs, "IPv6")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv4(exp_devs: str):
"""IPv4: get the content of BIRD tables and check it"""
tk.test_bird_routes("master4", exp_devs, "master4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv6(exp_devs: str):
"""IPv6: get the content of BIRD tables and check it"""
tk.test_bird_routes("master6", exp_devs, "master6")
import pytest
import tests.kernel as tk
import tests.config as cf
LIMIT = 60
EXPECTED_DEVICES = ("m1", "m2", "m3", "m4", "m5", "m6", "m7", "m8")
@pytest.mark.skipif(
tk.cf.save == False,
reason="No need to verify time of convergence during the check mode",
)
@pytest.mark.skipif(cf.save == False, reason="mode: save")
def test_wait():
"""Wait until the time (limit) runs out"""
tk.wait(LIMIT)
@pytest.mark.parametrize(
"expected_device", ["m1", "m2", "m3", "m4", "m5", "m6", "m7", "m8"],
)
def test_krt_routes(expected_device):
"""
Test kernel routes:
-------------------
- default parametr :limit: set to the value 60 seconds
"""
tk.test_krt_routes("krt", expected_device)
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv4(exp_devs: str):
"""IPv4: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt4", exp_devs, "IPv4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv6(exp_devs: str):
"""IPv6: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt6", exp_devs, "IPv6")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv4(exp_devs: str):
"""IPv4: get the content of BIRD tables and check it"""
tk.test_bird_routes("master4", exp_devs, "master4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv6(exp_devs: str):
"""IPv6: get the content of BIRD tables and check it"""
tk.test_bird_routes("master6", exp_devs, "master6")
import pytest
import tests.kernel as tk
import tests.config as cf
LIMIT = 60
EXPECTED_DEVICES = ("m1", "m2", "m3", "m4", "m5", "m6", "m7", "m8")
@pytest.mark.skipif(
tk.cf.save == False,
reason="No need to verify time of convergence during the check mode",
)
@pytest.mark.skipif(cf.save == False, reason="mode: save")
def test_wait():
"""Wait until the time (limit) runs out"""
tk.wait(LIMIT)
@pytest.mark.parametrize(
"expected_device", ["m1", "m2", "m3", "m4", "m5", "m6", "m7", "m8"],
)
def test_krt_routes(expected_device):
"""
Test kernel routes:
-------------------
- default parametr :limit: set to the value 60 seconds
"""
tk.test_krt_routes("krt", expected_device)
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv4(exp_devs: str):
"""IPv4: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt4", exp_devs, "IPv4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv6(exp_devs: str):
"""IPv6: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt6", exp_devs, "IPv6")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv4(exp_devs: str):
"""IPv4: get the content of BIRD tables and check it"""
tk.test_bird_routes("master4", exp_devs, "master4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv6(exp_devs: str):
"""IPv6: get the content of BIRD tables and check it"""
tk.test_bird_routes("master6", exp_devs, "master6")
import pytest
import tests.kernel as tk
import tests.config as cf
LIMIT = 60
EXPECTED_DEVICES = ("m1", "m2", "m3", "m4")
@pytest.mark.skipif(
tk.cf.save == False,
reason="No need to verify time of convergence during the check mode",
)
@pytest.mark.skipif(cf.save == False, reason="mode: save")
def test_wait():
"""Wait until the time (limit) runs out"""
tk.wait(LIMIT)
@pytest.mark.parametrize(
"expected_device", ["m1", "m2", "m3", "m4"],
)
def test_krt_routes(expected_device):
"""
Test kernel routes:
-------------------
- default parametr :limit: set to the value 60 seconds
"""
tk.test_krt_routes("krt", expected_device)
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv4(exp_devs: str):
"""IPv4: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt4", exp_devs, "IPv4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv6(exp_devs: str):
"""IPv6: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt6", exp_devs, "IPv6")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv4(exp_devs: str):
"""IPv4: get the content of BIRD tables and check it"""
tk.test_bird_routes("master4", exp_devs, "master4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv6(exp_devs: str):
"""IPv6: get the content of BIRD tables and check it"""
tk.test_bird_routes("master6", exp_devs, "master6")
import pytest
import tests.kernel as tk
import tests.config as cf
LIMIT = 60
EXPECTED_DEVICES = ("m1", "m2", "m3", "m4", "m5", "m6", "m7", "m8")
@pytest.mark.skipif(
tk.cf.save == False,
reason="No need to verify time of convergence during the check mode",
)
@pytest.mark.skipif(cf.save == False, reason="mode: save")
def test_wait():
"""Wait until the time (limit) runs out"""
tk.wait(LIMIT)
@pytest.mark.parametrize(
"expected_device", ["m1", "m2", "m3", "m4", "m5", "m6", "m7", "m8"],
)
def test_krt_routes(expected_device):
"""
Test kernel routes:
-------------------
- default parametr :limit: set to the value 60 seconds
"""
tk.test_krt_routes("krt", expected_device)
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv4(exp_devs: str):
"""IPv4: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt4", exp_devs, "IPv4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv6(exp_devs: str):
"""IPv6: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt6", exp_devs, "IPv6")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv4(exp_devs: str):
"""IPv4: get the content of BIRD tables and check it"""
tk.test_bird_routes("master4", exp_devs, "master4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv6(exp_devs: str):
"""IPv6: get the content of BIRD tables and check it"""
tk.test_bird_routes("master6", exp_devs, "master6")
import pytest
import tests.kernel as tk
import tests.config as cf
LIMIT = 60
EXPECTED_DEVICES = ("m1", "m2", "m3", "m4", "m5", "m6", "m7", "m8")
@pytest.mark.skipif(
tk.cf.save == False,
reason="No need to verify time of convergence during the check mode",
)
@pytest.mark.skipif(cf.save == False, reason="mode: save")
def test_wait():
"""Wait until the time (limit) runs out"""
tk.wait(LIMIT)
@pytest.mark.parametrize(
"expected_device", ["m1", "m2", "m3", "m4", "m5", "m6", "m7", "m8"],
)
def test_krt_routes(expected_device):
"""
Test kernel routes:
-------------------
- default parametr :limit: set to the value 60 seconds
"""
tk.test_krt_routes("krt", expected_device)
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv4(exp_devs: str):
"""IPv4: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt4", exp_devs, "IPv4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv6(exp_devs: str):
"""IPv6: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt6", exp_devs, "IPv6")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv4(exp_devs: str):
"""IPv4: get the content of BIRD tables and check it"""
tk.test_bird_routes("master4", exp_devs, "master4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_bird_routes_ipv6(exp_devs: str):
"""IPv6: get the content of BIRD tables and check it"""
tk.test_bird_routes("master6", exp_devs, "master6")
import os
import sys
import pickle
import pytest
from inspect import getsourcefile
import tests.kernel as tk
import tests.config as cf
LIMIT = 60
EXPECTED_DEVICES = ("m1", "m2", "m3", "m4", "m5", "m6", "m7", "m8", "m9", "m10")
@pytest.mark.skipif(tk.cf.save == False, reason="mode: save")
@pytest.mark.skipif(cf.save == False, reason="mode: save")
def test_wait():
"""Wait until the time (limit) runs out"""
tk.wait(LIMIT)
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_tables(exp_devs):
tk.test_krt_routes("krt", exp_devs)
def test_krt_routes_ipv4(exp_devs: str):
"""IPv4: get the content of KERNEL tables and check it"""
tk.test_krt_routes("krt4", exp_devs, "IPv4")
@pytest.mark.parametrize("exp_devs", EXPECTED_DEVICES)
def test_krt_routes_ipv6(exp_devs: str):