mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-27 11:06:32 +00:00
Fix all interface are primary (#2228)
This commit is contained in:
parent
ee49935b7d
commit
e1b9d754af
@ -27,7 +27,7 @@ class NetworkInterface(DBusInterfaceProxy):
|
|||||||
self.object_path = object_path
|
self.object_path = object_path
|
||||||
self.properties = {}
|
self.properties = {}
|
||||||
|
|
||||||
self.primary = True
|
self.primary = False
|
||||||
|
|
||||||
self._connection: Optional[NetworkConnection] = None
|
self._connection: Optional[NetworkConnection] = None
|
||||||
self._settings: Optional[NetworkSetting] = None
|
self._settings: Optional[NetworkSetting] = None
|
||||||
|
@ -16,6 +16,15 @@ async def test_api_network_info(api_client, coresys):
|
|||||||
assert TEST_INTERFACE in (
|
assert TEST_INTERFACE in (
|
||||||
inet["interface"] for inet in result["data"]["interfaces"]
|
inet["interface"] for inet in result["data"]["interfaces"]
|
||||||
)
|
)
|
||||||
|
assert TEST_INTERFACE_WLAN in (
|
||||||
|
inet["interface"] for inet in result["data"]["interfaces"]
|
||||||
|
)
|
||||||
|
|
||||||
|
for interface in result["data"]["interfaces"]:
|
||||||
|
if interface["interface"] == TEST_INTERFACE:
|
||||||
|
assert interface["primary"]
|
||||||
|
if interface["interface"] == TEST_INTERFACE_WLAN:
|
||||||
|
assert not interface["primary"]
|
||||||
|
|
||||||
assert result["data"]["docker"]["interface"] == DOCKER_NETWORK
|
assert result["data"]["docker"]["interface"] == DOCKER_NETWORK
|
||||||
assert result["data"]["docker"]["address"] == str(DOCKER_NETWORK_MASK)
|
assert result["data"]["docker"]["address"] == str(DOCKER_NETWORK_MASK)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user