refactor!: drop the _docker_bin override
CI / test (3.10) (pull_request) Successful in 29s
CI / test (3.11) (pull_request) Successful in 27s
CI / test (3.12) (pull_request) Successful in 29s
CI / test (3.10) (push) Successful in 28s
CI / test (3.11) (push) Successful in 26s
CI / test (3.12) (push) Successful in 28s

napalm-linux 0.3.0 drops the Docker CLI methods the override served.
_container_engine_binary("docker") returns Container Station's path
itself, which is all netOrk needs: it reaches the engine through
open_container_engine (NetOrk/netork#765, phase 9).

Requires napalm-linux >= 0.3.0. Version 0.3.0.
This commit is contained in:
Christian Manivong
2026-10-08 08:43:57 +02:00
parent 39532471b7
commit 912469bdc0
5 changed files with 23 additions and 15 deletions
+5 -4
View File
@@ -97,7 +97,7 @@ class TestRolesDoNotShadowLinux:
collision. There is nothing left to collide with.
"""
@pytest.mark.parametrize("method", ["get_services", "get_users", "get_docker_info"])
@pytest.mark.parametrize("method", ["get_services", "get_users"])
def test_os_surface_resolves_to_linux(self, method):
"""QTS really is Linux for these, so inheriting them is correct."""
from napalm_linux.linux import LinuxDriver
@@ -179,9 +179,10 @@ class TestDockerBinDiscovery:
with patch.object(driver, "_send", return_value=""):
assert driver._discover_docker_path() == "docker"
def test_docker_bin_hook_returns_the_discovered_path(self, driver):
driver._docker_path = "/opt/docker"
assert driver._docker_bin() == "/opt/docker"
def test_the_old_docker_methods_are_gone(self):
"""netOrk reaches Container Station over the Engine API (NetOrk/netork#765)."""
for name in ("get_docker_info", "get_docker_outdated", "_docker_bin"):
assert not hasattr(QnapQtsDriver, name), name
class TestContainerEngineBinary: