test: ipv6 end-to-end scenarios

vm01 gains a primary IPv6 next to its IPv4, one standalone IPv6 address
joins the dataset; covers ip_version on both sources, combination with
filters, the IPv6-preferring behaviour of netbox's combined primary IP,
and the invalid value error path.
This commit is contained in:
2026-08-25 14:53:24 +02:00
parent c1f0b4f724
commit 927bcabc97
3 changed files with 90 additions and 11 deletions

View File

@@ -59,6 +59,7 @@ def run_inventory(stack):
source: str = "",
filter_name: str = "",
filter_value: str = "",
ip_version: str = "",
args: tuple[str, ...] = ("--list",),
token: str | None = None,
):
@@ -71,6 +72,7 @@ def run_inventory(stack):
"NETBOX_INVENTORY_SOURCE": source or "ip-addresses",
"NETBOX_INVENTORY_FILTER": filter_name,
"NETBOX_INVENTORY_FILTER_VALUE": filter_value,
"NETBOX_INVENTORY_IP_VERSION": ip_version or "both",
}
result = subprocess.run(
[SCRIPT, *args], capture_output=True, text=True, timeout=120, env=env