diff options
| author | Michael Biebl <biebl@debian.org> | 2017-01-17 20:25:09 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2017-01-17 20:25:09 +0100 |
| commit | 58f8be580039b0575b197b9573a1c92745d96d30 (patch) | |
| tree | 2c226233f623a0dcb529be0eb8cdf97e4a2ae0c0 /libnm-core/tests/test-keyfile.c | |
| parent | 45cb5bb3c0e6edb887cf69b417fcaf7053814a9b (diff) | |
New upstream version 1.5.90 upstream/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 (); |