diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:56:23 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:56:23 +0000 |
commit | c15d6efd40655f717841d00839a43df1ead5cb26 (patch) | |
tree | 35d579f9a19170e2b39085669ca92533c2d161b4 /tests/topotests/ospf_instance_redistribute | |
parent | Adding upstream version 10.0.1. (diff) | |
download | frr-c15d6efd40655f717841d00839a43df1ead5cb26.tar.xz frr-c15d6efd40655f717841d00839a43df1ead5cb26.zip |
Adding upstream version 10.1.upstream/10.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/topotests/ospf_instance_redistribute')
-rw-r--r-- | tests/topotests/ospf_instance_redistribute/test_ospf_instance_redistribute.py | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/tests/topotests/ospf_instance_redistribute/test_ospf_instance_redistribute.py b/tests/topotests/ospf_instance_redistribute/test_ospf_instance_redistribute.py index 9dfe5e1..590b0d5 100644 --- a/tests/topotests/ospf_instance_redistribute/test_ospf_instance_redistribute.py +++ b/tests/topotests/ospf_instance_redistribute/test_ospf_instance_redistribute.py @@ -64,16 +64,9 @@ def setup_module(module): # This is a sample of configuration loading. r1 = tgen.gears["r1"] - r1.load_config( - TopoRouter.RD_ZEBRA, os.path.join(CWD, "r1/zebra.conf") - ) - r1.load_config( - TopoRouter.RD_OSPF, os.path.join(CWD, "r1/ospfd-3.conf"), - "-n 3" - ) - r1.load_config( - TopoRouter.RD_SHARP, os.path.join(CWD, "r1/sharpd.conf") - ) + r1.load_config(TopoRouter.RD_ZEBRA, os.path.join(CWD, "r1/zebra.conf")) + r1.load_config(TopoRouter.RD_OSPF, os.path.join(CWD, "r1/ospfd-3.conf"), "-n 3") + r1.load_config(TopoRouter.RD_SHARP, os.path.join(CWD, "r1/sharpd.conf")) tgen.start_router() @@ -103,13 +96,15 @@ def test_install_sharp_instance_routes(): expected = json.loads(open(json_file).read()) test_func = partial( - topotest.router_json_cmp, r1, "show ip route summ json", expected) + topotest.router_json_cmp, r1, "show ip route summ json", expected + ) logger.info("Ensuring that they exist in the rib/fib") _, result = topotest.run_and_expect(test_func, None, count=10, wait=1) assertmsg = '"r1" sharp routes are not installed' assert result is None, assertmsg + def test_ospf_instance_redistribute(): tgen = get_topogen() @@ -124,7 +119,8 @@ def test_ospf_instance_redistribute(): expected = json.loads(open(json_file).read()) test_func = partial( - topotest.router_json_cmp, r1, "show ip ospf 3 data json", expected) + topotest.router_json_cmp, r1, "show ip ospf 3 data json", expected + ) _, result = topotest.run_and_expect(test_func, None, count=10, wait=1) assertmsg = '"r1" ospf instance 3 does not have the proper redistributed routes' @@ -139,7 +135,8 @@ def test_ospf_instance_redistribute(): expected = json.loads(open(json_file).read()) test_func = partial( - topotest.router_json_cmp, r1, "show ip ospf 3 data json", expected) + topotest.router_json_cmp, r1, "show ip ospf 3 data json", expected + ) _, result = topotest.run_and_expect(test_func, None, count=10, wait=1) assertmsg = '"r1" ospf instance 3 does not have the proper redistributed routes' @@ -161,15 +158,14 @@ def test_ospf_instance_default_information(): expected = json.loads(open(json_file).read()) test_func = partial( - topotest.router_json_cmp, r1, "show ip ospf 3 data json", expected) + topotest.router_json_cmp, r1, "show ip ospf 3 data json", expected + ) _, result = topotest.run_and_expect(test_func, None, count=10, wait=1) assertmsg = '"r1" ospf instance 3 does not properly redistribute the default route' assert result is None, assertmsg - if __name__ == "__main__": args = ["-s"] + sys.argv[1:] sys.exit(pytest.main(args)) - |