Skip to content

Commit

Permalink
Ignore dns-data field in network settings update (#5147)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdegat01 authored Jun 24, 2024
1 parent 5e1d764 commit 49bc062
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions supervisor/dbus/network/setting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"addresses",
"address-data",
"dns",
"dns-data",
"gateway",
"method",
]
Expand Down
2 changes: 2 additions & 0 deletions tests/dbus/network/setting/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ async def test_update(
assert settings["ipv4"]["method"] == Variant("s", "auto")
assert "gateway" not in settings["ipv4"]
assert "dns" not in settings["ipv4"]
assert "dns-data" not in settings["ipv4"]
assert "address-data" not in settings["ipv4"]
assert "addresses" not in settings["ipv4"]
assert len(settings["ipv4"]["route-data"].value) == 1
Expand All @@ -83,6 +84,7 @@ async def test_update(
assert settings["ipv6"]["method"] == Variant("s", "auto")
assert "gateway" not in settings["ipv6"]
assert "dns" not in settings["ipv6"]
assert "dns-data" not in settings["ipv6"]
assert "address-data" not in settings["ipv6"]
assert "addresses" not in settings["ipv6"]
assert settings["ipv6"]["addr-gen-mode"] == Variant("i", 0)
Expand Down
1 change: 1 addition & 0 deletions tests/dbus_service_mocks/network_connection_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
),
"addresses": Variant("aau", [[2483202240, 24, 16951488]]),
"dns": Variant("au", [16951488]),
"dns-data": Variant("as", ["192.168.2.1"]),
"dns-search": Variant("as", []),
"gateway": Variant("s", "192.168.2.1"),
"method": Variant("s", "auto"),
Expand Down

0 comments on commit 49bc062

Please sign in to comment.