From c1f743ab2e4a7046d5500875a47d1f62c8624603 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 8 Apr 2024 22:37:50 +0200 Subject: Adding upstream version 5.7.1. Signed-off-by: Daniel Baumann --- tests/integration/deckard/tools/conftest.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/integration/deckard/tools/conftest.py (limited to 'tests/integration/deckard/tools/conftest.py') diff --git a/tests/integration/deckard/tools/conftest.py b/tests/integration/deckard/tools/conftest.py new file mode 100644 index 0000000..1b865fb --- /dev/null +++ b/tests/integration/deckard/tools/conftest.py @@ -0,0 +1,19 @@ +import ipaddress + +# These are IPs of a.ns.nic.cz +AUTHORITATIVE_SERVERS = [ipaddress.IPv4Address("194.0.12.1"), + ipaddress.IPv6Address("2001:678:f::1")] + + +def pytest_addoption(parser): + parser.addoption("--forwarder", action="append", help="IP of forwarder to test") + + +def pytest_generate_tests(metafunc): + if 'forwarder' in metafunc.fixturenames: + forwarder = metafunc.config.option.forwarder + metafunc.parametrize("forwarder", [ipaddress.ip_address(f) for f in forwarder], ids=str) + if 'tcp' in metafunc.fixturenames: + metafunc.parametrize("tcp", [False, True], ids=lambda x: "TCP" if x else "UDP") + if 'server' in metafunc.fixturenames: + metafunc.parametrize("server", AUTHORITATIVE_SERVERS, ids=str) -- cgit v1.2.3