Fix all interface are primary (#2228)

This commit is contained in:
Pascal Vizeli 2020-11-09 09:27:16 +01:00 committed by GitHub
parent ee49935b7d
commit e1b9d754af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -27,7 +27,7 @@ class NetworkInterface(DBusInterfaceProxy):
self.object_path = object_path
self.properties = {}
self.primary = True
self.primary = False
self._connection: Optional[NetworkConnection] = None
self._settings: Optional[NetworkSetting] = None

View File

@ -16,6 +16,15 @@ async def test_api_network_info(api_client, coresys):
assert TEST_INTERFACE in (
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"]["address"] == str(DOCKER_NETWORK_MASK)