From 08253740eff37ff4fd5dfbc51eaaf86767068339 Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Tue, 3 Sep 2024 00:41:03 -0400 Subject: [PATCH] tests: fix munet native topotest runs Enabe/fix using a munet.yaml config file for topology configuration. Easier test writing. This also uses the standard `frrinit.sh` to launch and teardown FRR, so we actually test what most users use. Signed-off-by: Christian Hopps --- tests/topotests/conftest.py | 2 +- tests/topotests/kinds.yaml | 3 ++- tests/topotests/pytest.ini | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/topotests/conftest.py b/tests/topotests/conftest.py index a2315138cc..be28b388ba 100755 --- a/tests/topotests/conftest.py +++ b/tests/topotests/conftest.py @@ -32,7 +32,7 @@ from lib import topolog, topotest try: # Used by munet native tests - from munet.testing.fixtures import event_loop, unet # pylint: disable=all # noqa + from munet.testing.fixtures import unet # pylint: disable=all # noqa @pytest.fixture(scope="module") def rundir_module(pytestconfig): diff --git a/tests/topotests/kinds.yaml b/tests/topotests/kinds.yaml index 5f4b61d4b7..20c819c79c 100644 --- a/tests/topotests/kinds.yaml +++ b/tests/topotests/kinds.yaml @@ -10,9 +10,10 @@ kinds: /usr/lib/frr/frrinit.sh stop volumes: - "./%NAME%:/etc/frr" + - "%RUNDIR%/var.lib.frr:/var/lib/frr" - "%RUNDIR%/var.log.frr:/var/log/frr" - "%RUNDIR%/var.run.frr:/var/run/frr" - - "%RUNDIR%/var.lib.frr:/var/lib/frr" + - "%RUNDIR%/var.tmp.frr:/var/tmp/frr" cap-add: - SYS_ADMIN - AUDIT_WRITE diff --git a/tests/topotests/pytest.ini b/tests/topotests/pytest.ini index db806fed39..9f33917c6b 100644 --- a/tests/topotests/pytest.ini +++ b/tests/topotests/pytest.ini @@ -1,6 +1,8 @@ # Skip pytests example directory [pytest] +asyncio_mode = auto + # NEEDS_EXABGP_4_2_11_FRR # asyncio_mode = auto -- 2.39.5