NetworkManager/libnm-core/tests
Dan Winship aeb3d093f6 libnm-core: clean up NMConnectionError
Rename NM_CONNECTION_ERROR_UNKNOWN to NM_CONNECTION_ERROR_FAILED,
following GError best practices.

Replace NM_CONNECTION_ERROR_CONNECTION_SETTING_NOT_FOUND ("no
NMSettingConnection") with a more generic
NM_CONNECTION_ERROR_MISSING_SETTING. Use that new code in a few places
that had previously been using NM_CONNECTION_ERROR_SETTING_NOT_FOUND,
which was supposed to mean "the setting that you asked about doesn't
exist", not "the connection is invalid because it's missing a required
setting".

Clarify that NM_CONNECTION_ERROR_INVALID_SETTING can be used for any
"invalid or inappropriate NMSetting", not just a "conflicting" one.
(But fix a case in nm_connection_update_secrets() that was returning
INVALID_SETTING when it should have been return-if-failing instead.)

For both MISSING_SETTING and INVALID_SETTING, always prefix the error
message with "setting-name: ", just like we do with the various
NMSetting MISSING_PROPERTY and INVALID_PROPERTY errors. And make sure
that the error message is marked for localization.

Drop NM_CONNECTION_ERROR_CONNECTION_TYPE_INVALID, which is pretty
pointless; it was only used in the case where connection.type was the
name of a valid setting type that is not a base setting type. Instead,
just return NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY for
connection.type in this case (which is what the code already did when
connection.type was completely unrecognized).
2014-10-22 08:29:07 -04:00
..
Makefile.am libnm-core: update tests to be fully variant-based 2014-09-18 11:51:09 -04:00
test-compare.c libnm-core: change connection hash tables to variants in API 2014-09-18 11:51:09 -04:00
test-crypto.c libnm-core: replace GByteArray with pointer + length in some APIs 2014-09-04 09:20:11 -04:00
test-general.c libnm-core: clean up NMConnectionError 2014-10-22 08:29:07 -04:00
test-secrets.c libnm-core: clean up NMConnectionError 2014-10-22 08:29:07 -04:00
test-setting-8021x.c libnm-core: change DBUS_TYPE_G_UCHAR_ARRAY properties to G_TYPE_BYTES 2014-09-04 09:20:11 -04:00
test-setting-dcb.c libnm: add libnm/libnm-core (part 2) 2014-08-01 14:34:04 -04:00
test-settings-defaults.c libnm: add libnm/libnm-core (part 2) 2014-08-01 14:34:04 -04:00