diff options
| author | Michael Biebl <biebl@debian.org> | 2017-01-17 20:25:47 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2017-01-17 20:25:47 +0100 |
| commit | bed53db3e064450b56e23ec654f40a3bafe58815 (patch) | |
| tree | 314508d6c904b1224dab2070e0cfdd5a02d7dd89 /libnm-core/tests/test-keyfile.c | |
| parent | 7135a6e87c938139e3a5db121d62dcaa783345d1 (diff) | |
| parent | 58f8be580039b0575b197b9573a1c92745d96d30 (diff) | |
Merge tag 'upstream/1.5.90' into experimental
Upstream version 1.5.90
Diffstat (limited to 'libnm-core/tests/test-keyfile.c')
| -rw-r--r-- | libnm-core/tests/test-keyfile.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/libnm-core/tests/test-keyfile.c b/libnm-core/tests/test-keyfile.c index b9b211b6..9944eb5e 100644 --- a/libnm-core/tests/test-keyfile.c +++ b/libnm-core/tests/test-keyfile.c @@ -28,6 +28,7 @@ #include "nm-setting-wired.h" #include "nm-setting-8021x.h" #include "nm-setting-team.h" +#include "nm-setting-proxy.h" #include "nm-utils/nm-test-utils.h" @@ -36,7 +37,7 @@ #define TEST_WIRED_TLS_PRIVKEY TEST_CERT_DIR"/test-key-and-cert.pem" -/******************************************************************************/ +/*****************************************************************************/ #define CLEAR(con, keyfile) \ G_STMT_START { \ @@ -115,8 +116,21 @@ _nm_keyfile_read (GKeyFile *keyfile, if (needs_normalization) { nmtst_assert_connection_verifies_after_normalization (con, 0, 0); nmtst_connection_normalize (con); - } else + } else { + { + NMSettingConnection *s_con; + + /* a non-slave connection must have a proxy setting, but + * keyfile reader does not add that (unless a [proxy] section + * is present. */ + s_con = nm_connection_get_setting_connection (con); + if ( s_con + && !nm_setting_connection_get_master (s_con) + && !nm_connection_get_setting_proxy (con)) + nm_connection_add_setting (con, nm_setting_proxy_new ()); + } nmtst_assert_connection_verifies_without_normalization (con); + } return con; } @@ -219,7 +233,7 @@ _keyfile_convert (NMConnection **con, } } -/******************************************************************************/ +/*****************************************************************************/ static void _test_8021x_cert_check (NMConnection *con, @@ -359,7 +373,7 @@ test_8021x_cert (void) } -/******************************************************************************/ +/*****************************************************************************/ static void test_8021x_cert_read (void) @@ -567,7 +581,7 @@ test_team_conf_read_invalid (void) #endif } -/******************************************************************************/ +/*****************************************************************************/ NMTST_DEFINE (); |