mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 19:40:12 +01:00
ifcfg-rh: add test for BOOTPROTO=autoip
Previous commit fixed parsing of these connection; let's check that we don't regress there.
This commit is contained in:
parent
2e2f56697f
commit
36573225b6
3 changed files with 26 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ EXTRA_DIST = \
|
|||
ifcfg-test-wired-shared-plus-ip \
|
||||
ifcfg-test-wired-dhcp-send-hostname \
|
||||
ifcfg-test-wired-dhcp6-only \
|
||||
ifcfg-test-wired-autoip \
|
||||
ifcfg-test-wired-global-gateway \
|
||||
network-test-wired-global-gateway \
|
||||
ifcfg-test-wired-global-gateway-ignore \
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
TYPE=Ethernet
|
||||
DEVICE=eth0
|
||||
BOOTPROTO=autoip
|
||||
IPV4_FAILURE_FATAL=yes
|
||||
PEERDNS=no
|
||||
|
|
@ -1318,6 +1318,25 @@ test_read_wired_dhcp6_only (void)
|
|||
g_object_unref (connection);
|
||||
}
|
||||
|
||||
static void
|
||||
test_read_wired_autoip (void)
|
||||
{
|
||||
gs_unref_object NMConnection *connection = NULL;
|
||||
NMSettingIPConfig *s_ip4;
|
||||
char *unmanaged = NULL;
|
||||
|
||||
connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wired-autoip",
|
||||
NULL, TYPE_ETHERNET,
|
||||
&unmanaged);
|
||||
g_assert (unmanaged == NULL);
|
||||
|
||||
s_ip4 = nm_connection_get_setting_ip4_config (connection);
|
||||
g_assert (s_ip4);
|
||||
g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip4), ==, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL);
|
||||
g_assert (!nm_setting_ip_config_get_may_fail (s_ip4));
|
||||
g_assert (nm_setting_ip_config_get_ignore_auto_dns (s_ip4));
|
||||
}
|
||||
|
||||
static void
|
||||
test_read_onboot_no (void)
|
||||
{
|
||||
|
|
@ -8752,6 +8771,7 @@ int main (int argc, char **argv)
|
|||
nmtst_add_test_func (TPATH "wired-ipv6-only/1", test_read_wired_ipv6_only, TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-ipv6-only-1", "System test-wired-ipv6-only-1");
|
||||
|
||||
g_test_add_func (TPATH "wired/dhcpv6-only", test_read_wired_dhcp6_only);
|
||||
g_test_add_func (TPATH "wired/autoip", test_read_wired_autoip);
|
||||
g_test_add_func (TPATH "wired/onboot/no", test_read_onboot_no);
|
||||
g_test_add_func (TPATH "wired/no-ip", test_read_noip);
|
||||
g_test_add_func (TPATH "802-1x/peap/mschapv2", test_read_wired_8021x_peap_mschapv2);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue