mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 06:10:11 +01:00
initrd/tests: add unit test for autoconnect-priority setting
Fixes:98575bd513('initrd: generate initrd generator profiles with autoconnect-priority -100') (cherry picked from commit28ab535617)
This commit is contained in:
parent
8f92a51305
commit
6de49febc3
2 changed files with 18 additions and 0 deletions
|
|
@ -114,6 +114,9 @@ test_auto(void)
|
|||
g_assert_cmpint(nm_setting_connection_get_wait_device_timeout(s_con), ==, -1);
|
||||
|
||||
g_assert(nm_setting_connection_get_autoconnect(s_con));
|
||||
g_assert_cmpint(nm_setting_connection_get_autoconnect_priority(s_con),
|
||||
==,
|
||||
NMI_AUTOCONNECT_PRIORITY_CMDLINE);
|
||||
|
||||
s_wired = nm_connection_get_setting_wired(connection);
|
||||
g_assert(s_wired);
|
||||
|
|
@ -174,6 +177,9 @@ test_dhcp_with_hostname(void)
|
|||
g_assert_cmpint(nm_setting_connection_get_wait_device_timeout(s_con), ==, -1);
|
||||
|
||||
g_assert(nm_setting_connection_get_autoconnect(s_con));
|
||||
g_assert_cmpint(nm_setting_connection_get_autoconnect_priority(s_con),
|
||||
==,
|
||||
NMI_AUTOCONNECT_PRIORITY_CMDLINE);
|
||||
|
||||
s_wired = nm_connection_get_setting_wired(connection);
|
||||
g_assert(s_wired);
|
||||
|
|
@ -219,6 +225,9 @@ test_dhcp_with_mtu(void)
|
|||
g_assert_cmpint(nm_setting_connection_get_wait_device_timeout(s_con), ==, -1);
|
||||
|
||||
g_assert(nm_setting_connection_get_autoconnect(s_con));
|
||||
g_assert_cmpint(nm_setting_connection_get_autoconnect_priority(s_con),
|
||||
==,
|
||||
NMI_AUTOCONNECT_PRIORITY_CMDLINE);
|
||||
|
||||
s_wired = nm_connection_get_setting_wired(connection);
|
||||
g_assert(s_wired);
|
||||
|
|
@ -279,6 +288,9 @@ test_dhcp_timeout(void)
|
|||
g_assert_cmpint(nm_setting_connection_get_wait_device_timeout(s_con), ==, -1);
|
||||
g_assert_cmpint(nm_setting_connection_get_autoconnect_retries(s_con), ==, 1);
|
||||
g_assert(nm_setting_connection_get_autoconnect(s_con));
|
||||
g_assert_cmpint(nm_setting_connection_get_autoconnect_priority(s_con),
|
||||
==,
|
||||
NMI_AUTOCONNECT_PRIORITY_CMDLINE);
|
||||
|
||||
s_ip4 = nm_connection_get_setting_ip4_config(connection);
|
||||
g_assert(s_ip4);
|
||||
|
|
|
|||
|
|
@ -72,6 +72,9 @@ test_read_ibft_dhcp(void)
|
|||
g_assert_cmpstr(nm_setting_connection_get_interface_name(s_con), ==, NULL);
|
||||
g_assert_cmpint(nm_setting_connection_get_timestamp(s_con), ==, 0);
|
||||
g_assert(nm_setting_connection_get_autoconnect(s_con));
|
||||
g_assert_cmpint(nm_setting_connection_get_autoconnect_priority(s_con),
|
||||
==,
|
||||
NMI_AUTOCONNECT_PRIORITY_FIRMWARE);
|
||||
|
||||
s_wired = nm_connection_get_setting_wired(connection);
|
||||
g_assert(s_wired);
|
||||
|
|
@ -121,6 +124,9 @@ test_read_ibft_static(void)
|
|||
g_assert_cmpstr(nm_setting_connection_get_interface_name(s_con), ==, NULL);
|
||||
g_assert_cmpint(nm_setting_connection_get_timestamp(s_con), ==, 0);
|
||||
g_assert(nm_setting_connection_get_autoconnect(s_con));
|
||||
g_assert_cmpint(nm_setting_connection_get_autoconnect_priority(s_con),
|
||||
==,
|
||||
NMI_AUTOCONNECT_PRIORITY_FIRMWARE);
|
||||
|
||||
s_wired = nm_connection_get_setting_wired(connection);
|
||||
g_assert(s_wired);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue