diff options
author | Thomas Haller <thaller@redhat.com> | 2014-07-11 11:01:52 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-08-22 15:24:31 +0200 |
commit | 78edf6f5816c4d39537c96c5653f8da6e8c7ec0c (patch) | |
tree | feb9a35f1d01f2446651643ae5205eac8234d6c9 | |
parent | 54ff670423abf86b12833f980f8cff9c39f8c1b9 (diff) |
keyfile/tests: add keyfile_read_connection_from_file() utility function
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r-- | src/settings/plugins/keyfile/tests/test-keyfile.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/settings/plugins/keyfile/tests/test-keyfile.c b/src/settings/plugins/keyfile/tests/test-keyfile.c index 369085dd9a..fb58e22454 100644 --- a/src/settings/plugins/keyfile/tests/test-keyfile.c +++ b/src/settings/plugins/keyfile/tests/test-keyfile.c @@ -114,6 +114,22 @@ check_ip6_route (NMSettingIP6Config *config, int idx, const char *destination_st g_assert (nm_ip6_route_get_metric (route) == metric); } +static NMConnection * +keyfile_read_connection_from_file (const char *filename) +{ + GError *error = NULL; + NMConnection *connection; + + g_assert (filename); + + connection = nm_keyfile_plugin_connection_from_file (filename, &error); + g_assert_no_error (error); + + nmtst_assert_connection_verifies_without_normalization (connection); + + return connection; +} + static void test_read_valid_wired_connection (void) { |