ifcfg-rh/tests: fix test after changing behavior for setting NM_SETTING_IP_CONFIG_GATEWAY

Since commit bb868770, setting a gateway of "0.0.0.0"
or "::" in NMSettingIPConfig means to set the gateway
to NULL. There is indeed no difference between an unset
gateway and an any gateway. This change was done to have
a consistent behavior in NMSettingIPConfig.

Fixes: bb86877031
This commit is contained in:
Thomas Haller 2016-01-29 20:14:10 +01:00
parent 60b7ed3bdc
commit a76a1abb49

View file

@ -6616,7 +6616,7 @@ test_write_wired_static_ip6_only_gw (gconstpointer user_data)
g_assert (addr6);
/* assert that the gateway was written and reloaded as expected */
if (!gateway6) {
if (!gateway6 || !strcmp (gateway6, "::")) {
g_assert (nm_setting_ip_config_get_gateway (s_ip6) == NULL);
g_assert (written_ifcfg_gateway == NULL);
} else {