Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/check-network
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class TestNetwork(VirtInstallMachineCase):
i.open()

iface = n.get_the_iface()
n.assert_default_nm_wired_connection_props(iface)
n.preinstall_connection_test(i, iface)

@run_on_vm_setups("", "bootopts-net1")
Expand Down
27 changes: 27 additions & 0 deletions test/helpers/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,3 +311,30 @@ def disable_ipv4(self):
b.select_from_dropdown("#network-ip-settings-select-method", "disabled")
b.click("#network-ip-settings-save")
b.wait_not_present("#network-ip-settings-dialog")

def assert_default_nm_wired_connection_props(self, iface):
"""Check the assumptions NM default Wired Connection.

The 'Wired Connection' is created in initramfs by NM as a default
connection. Cockpit has some assumptions about properties of the
connection when replacing it with persistent connection upon editing
(COCKPIT-1750)
Comment thread
sourcery-ai[bot] marked this conversation as resolved.
This check should assert that these assumptions hold.
"""
n = self

# The default connection name
con_name = WIRED_CONNECTION_NAME

# The connection is active on the iface.
n.check_iface_state(iface, "GENERAL.CONNECTION", con_name)
n.check_iface_state(iface, "GENERAL.STATE", "connected", match_type="substr")

# The connection is not persistent
n.check_con_profile_files(con_name, 1, persistent=False)
# The properties assumed by Cockpit
n.check_con_settings([
[con_name, "connection.interface-name", "", None],
[con_name, "connection.type", "802-3-ethernet", None],
[con_name, "connection.multi-connect", "3", None],
Comment thread
sourcery-ai[bot] marked this conversation as resolved.
])
Comment thread
rvykydal marked this conversation as resolved.
Loading