Commit c1e11023 authored by Ondřej Zajíček's avatar Ondřej Zajíček
Browse files

Tests: cf-ospf is not a real test case

parent 476753bd
10.0.1.0/24 dev ve1 proto kernel scope link src 10.0.1.1
10.0.1.0/24 dev ve1 proto bird scope link metric 32
10.0.2.0/24 via 10.0.1.2 dev ve1 proto bird metric 32
10.0.3.0/24 via 10.0.4.1 dev ve2 proto bird metric 32
10.0.4.0/24 dev ve2 proto kernel scope link src 10.0.4.2
10.0.4.0/24 dev ve2 proto bird scope link metric 32
10.1.1.0/24 dev ve0 proto kernel scope link src 10.1.1.1
10.1.1.0/24 dev ve0 proto bird scope link metric 32
10.2.1.0/24 via 10.0.1.2 dev ve1 proto bird metric 32
10.3.1.0/24 proto bird metric 32
nexthop via 10.0.1.2 dev ve1 weight 1
nexthop via 10.0.4.1 dev ve2 weight 1
10.4.1.0/24 via 10.0.4.1 dev ve2 proto bird metric 32
192.168.120.0/24 via 10.0.4.1 dev ve2 proto bird metric 32
192.168.220.0 proto bird metric 32
nexthop via 10.0.1.2 dev ve1 weight 1
nexthop via 10.0.4.1 dev ve2 weight 1
\ No newline at end of file
10.0.1.0/24 dev ve2 proto kernel scope link src 10.0.1.2
10.0.1.0/24 dev ve2 proto bird scope link metric 32
10.0.2.0/24 dev ve1 proto kernel scope link src 10.0.2.1
10.0.2.0/24 dev ve1 proto bird scope link metric 32
10.0.3.0/24 via 10.0.2.2 dev ve1 proto bird metric 32
10.0.4.0/24 via 10.0.1.1 dev ve2 proto bird metric 32
10.1.1.0/24 via 10.0.1.1 dev ve2 proto bird metric 32
10.2.1.0/24 dev ve0 proto kernel scope link src 10.2.1.1
10.2.1.0/24 dev ve0 proto bird scope link metric 32
10.3.1.0/24 via 10.0.2.2 dev ve1 proto bird metric 32
10.4.1.0/24 proto bird metric 32
nexthop via 10.0.1.1 dev ve2 weight 1
nexthop via 10.0.2.2 dev ve1 weight 1
192.168.120.0/24 proto bird metric 32
nexthop via 10.0.1.1 dev ve2 weight 1
nexthop via 10.0.2.2 dev ve1 weight 1
192.168.220.0 via 10.0.2.2 dev ve1 proto bird metric 32
\ No newline at end of file
10.0.1.0/24 via 10.0.2.1 dev ve2 proto bird metric 32
10.0.2.0/24 dev ve2 proto kernel scope link src 10.0.2.2
10.0.2.0/24 dev ve2 proto bird scope link metric 32
10.0.3.0/24 dev ve1 proto kernel scope link src 10.0.3.1
10.0.3.0/24 dev ve1 proto bird scope link metric 32
10.0.4.0/24 via 10.0.3.2 dev ve1 proto bird metric 32
10.1.1.0/24 proto bird metric 32
nexthop via 10.0.2.1 dev ve2 weight 1
nexthop via 10.0.3.2 dev ve1 weight 1
10.2.1.0/24 via 10.0.2.1 dev ve2 proto bird metric 32
10.3.1.0/24 dev ve0 proto kernel scope link src 10.3.1.1
10.3.1.0/24 dev ve0 proto bird scope link metric 32
10.4.1.0/24 via 10.0.3.2 dev ve1 proto bird metric 32
192.168.120.0/24 via 10.0.3.2 dev ve1 proto bird metric 32
\ No newline at end of file
10.0.1.0/24 via 10.0.4.2 dev ve1 proto bird metric 32
10.0.2.0/24 via 10.0.3.1 dev ve2 proto bird metric 32
10.0.3.0/24 dev ve2 proto kernel scope link src 10.0.3.2
10.0.3.0/24 dev ve2 proto bird scope link metric 32
10.0.4.0/24 dev ve1 proto kernel scope link src 10.0.4.1
10.0.4.0/24 dev ve1 proto bird scope link metric 32
10.1.1.0/24 via 10.0.4.2 dev ve1 proto bird metric 32
10.2.1.0/24 proto bird metric 32
nexthop via 10.0.3.1 dev ve2 weight 1
nexthop via 10.0.4.2 dev ve1 weight 1
10.3.1.0/24 via 10.0.3.1 dev ve2 proto bird metric 32
10.4.1.0/24 dev ve0 proto kernel scope link src 10.4.1.1
10.4.1.0/24 dev ve0 proto bird scope link metric 32
192.168.220.0 via 10.0.3.1 dev ve2 proto bird metric 32
\ No newline at end of file
import pytest
import tests.kernel as tk
import tests.config as cf
LIMIT = 60
EXPECTED_DEVICES = ("m1", "m2", "m3", "m4")
@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_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")
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