Merge pull request #3027 from tikD1337/fix/ubridge-kernel-datapath-version

Require uBridge >= 1.3.1
This commit is contained in:
Jeremy Grossmann authored and GitHub committed 2026-10-25 02:49:15 +02:00
commit fa4b763640
2 files changed
+17 -10

No files matched your search

+13 -6
View File
@@ -168,30 +168,37 @@ async def test_stop_tcp_has_no_socket_to_unlink(tmp_path, monkeypatch):
@pytest.mark.asyncio
async def test_requires_ubridge_1_2_3(tmp_path, monkeypatch):
@pytest.mark.parametrize(
"version",
[
"1.2.3", # has the tap module, but no kernel dataplane
"1.3.0", # no per-interface capture stop_kernel
],
)
async def test_requires_ubridge_1_3_1(tmp_path, monkeypatch, version):
hyp = _make("unix", tmp_path, monkeypatch)
with patch(
"gns3server.compute.ubridge.hypervisor.subprocess_check_output",
new_callable=AsyncMock,
return_value="ubridge version 1.2.2",
return_value=f"ubridge version {version}",
):
with pytest.raises(UbridgeError, match=r">= 1\.2\.3"):
with pytest.raises(UbridgeError, match=r">= 1\.3\.1"):
await hyp._check_ubridge_version()
@pytest.mark.asyncio
async def test_accepts_ubridge_1_2_3(tmp_path, monkeypatch):
async def test_accepts_ubridge_1_3_1(tmp_path, monkeypatch):
hyp = _make("unix", tmp_path, monkeypatch)
with patch(
"gns3server.compute.ubridge.hypervisor.subprocess_check_output",
new_callable=AsyncMock,
return_value="ubridge version 1.2.3",
return_value="ubridge version 1.3.1",
):
await hyp._check_ubridge_version()
assert hyp.version == "1.2.3"
assert hyp.version == "1.3.1"
# ---------------------------------------------------------------------------