Closed agners closed 2 months ago
tests/dbus/network/setting/test_generate.py (4)
`12-12`: **Approved import change.** The change from `TEST_INTERFACE` to `TEST_INTERFACE_ETH_NAME` aligns with the PR's objective to focus on Ethernet interfaces, enhancing test specificity and accuracy. --- `17-17`: **Approved test function changes.** The use of `TEST_INTERFACE_ETH_NAME` in `test_get_connection_from_interface` and `test_get_connection_no_path` is appropriate and aligns with the PR's objectives to enhance test accuracy by focusing on Ethernet interfaces. Also applies to: 36-36 --- `36-36`: **Approved test function changes.** The use of `TEST_INTERFACE_ETH_NAME` in `test_get_connection_no_path` ensures that the test is focused on Ethernet interfaces, aligning with the PR's objectives to enhance test accuracy. --- Line range hint `50-74`: **Approved VLAN test function.** The function `test_generate_from_vlan` is well-implemented and crucial for testing VLAN configurations. It is not directly affected by the changes in this PR but is important for the overall robustness of network settings tests.
On the note of headache, is there any particular tests you want to add around updating network interfaces for edge cases you've seen? Or is updating this good enough to cover the impact of these new properties and ensure we're handling it properly? No worries if not, this looks great as is.
Yeah good point. I've added one more API test named test_api_network_interface_update_ethernet
which changes to "static" then to "auto" and checking what gets written to D-Bus directly, so end-to-end essentially. This tests the current behavior, so we know from what we set out for upcoming changes.
Proposed change
This improves mainly the connection settings fixture. The behavior is more closely to real NetworkManager, mainly in that the actual NetworkManager seems to add some default properties automatically (represented by the new
MINIMAL_
settings). Also make theUpdate()
call behave largely like NetworkManager, e.g. requiring a minimal set of settings/properties, and update the complete setting but include theMINIMAL_
setting just like NetworkManager.Type of change
Additional information
Checklist
ruff format supervisor tests
)If API endpoints or add-on configuration are added/changed:
Summary by CodeRabbit
New Features
Bug Fixes