[network-manager-openvpn] tests: fix testing of ports with respect of "remote" vs "port" options



commit a2c420310d875b19ab98b7dc389e081f78548556
Author: Jiří Klimeš <jklimes redhat com>
Date:   Thu May 28 12:59:11 2015 +0200

    tests: fix testing of ports with respect of "remote" vs "port" options
    
    The 'port' and 'rport' are now only default values and port from 'remote'
    is not put to 'port' option.
    
    Fixes: 6d275a2923828a81180a5539992b4716da86899c
    
    Found by: Thomas Haller

 properties/tests/test-import-export.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/properties/tests/test-import-export.c b/properties/tests/test-import-export.c
index 3fcdf1e..1d783bc 100644
--- a/properties/tests/test-import-export.c
+++ b/properties/tests/test-import-export.c
@@ -145,8 +145,8 @@ test_password_import (NMVpnPluginUiInterface *plugin, const char *dir)
        test_item ("password-import-data", s_vpn, NM_OPENVPN_KEY_COMP_LZO, NULL);
        test_item ("password-import-data", s_vpn, NM_OPENVPN_KEY_FLOAT, NULL);
        test_item ("password-import-data", s_vpn, NM_OPENVPN_KEY_RENEG_SECONDS, "0");
-       test_item ("password-import-data", s_vpn, NM_OPENVPN_KEY_REMOTE, "test.server.com");
-       test_item ("password-import-data", s_vpn, NM_OPENVPN_KEY_PORT, "443");
+       test_item ("password-import-data", s_vpn, NM_OPENVPN_KEY_REMOTE, "test.server.com:443");
+       test_item ("password-import-data", s_vpn, NM_OPENVPN_KEY_PORT, "2352");
        test_item ("password-import-data", s_vpn, NM_OPENVPN_KEY_CERT, NULL);
        test_item ("password-import-data", s_vpn, NM_OPENVPN_KEY_KEY, NULL);
        test_item ("password-import-data", s_vpn, NM_OPENVPN_KEY_STATIC_KEY, NULL);
@@ -276,8 +276,8 @@ test_tls_import (NMVpnPluginUiInterface *plugin, const char *dir)
        test_item ("tls-import-data", s_vpn, NM_OPENVPN_KEY_COMP_LZO, "yes");
        test_item ("tls-import-data", s_vpn, NM_OPENVPN_KEY_FLOAT, "yes");
        test_item ("tls-import-data", s_vpn, NM_OPENVPN_KEY_RENEG_SECONDS, NULL);
-       test_item ("tls-import-data", s_vpn, NM_OPENVPN_KEY_REMOTE, "173.8.149.245");
-       test_item ("tls-import-data", s_vpn, NM_OPENVPN_KEY_PORT, "1194");
+       test_item ("tls-import-data", s_vpn, NM_OPENVPN_KEY_REMOTE, "173.8.149.245:1194");
+       test_item ("tls-import-data", s_vpn, NM_OPENVPN_KEY_PORT, NULL);
        test_item ("tls-import-data", s_vpn, NM_OPENVPN_KEY_STATIC_KEY, NULL);
        test_item ("tls-import-data", s_vpn, NM_OPENVPN_KEY_STATIC_KEY_DIRECTION, NULL);
        test_item ("tls-import-data", s_vpn, NM_OPENVPN_KEY_CIPHER, NULL);
@@ -392,8 +392,8 @@ test_pkcs12_import (NMVpnPluginUiInterface *plugin, const char *dir)
        test_item ("pkcs12-import-data", s_vpn, NM_OPENVPN_KEY_COMP_LZO, "yes");
        test_item ("pkcs12-import-data", s_vpn, NM_OPENVPN_KEY_FLOAT, NULL);
        test_item ("pkcs12-import-data", s_vpn, NM_OPENVPN_KEY_RENEG_SECONDS, NULL);
-       test_item ("pkcs12-import-data", s_vpn, NM_OPENVPN_KEY_REMOTE, "173.8.149.245");
-       test_item ("pkcs12-import-data", s_vpn, NM_OPENVPN_KEY_PORT, "1194");
+       test_item ("pkcs12-import-data", s_vpn, NM_OPENVPN_KEY_REMOTE, "173.8.149.245:1194");
+       test_item ("pkcs12-import-data", s_vpn, NM_OPENVPN_KEY_PORT, NULL);
        test_item ("pkcs12-import-data", s_vpn, NM_OPENVPN_KEY_STATIC_KEY, NULL);
        test_item ("pkcs12-import-data", s_vpn, NM_OPENVPN_KEY_STATIC_KEY_DIRECTION, NULL);
        test_item ("pkcs12-import-data", s_vpn, NM_OPENVPN_KEY_CIPHER, NULL);
@@ -765,8 +765,8 @@ test_proxy_http_import (NMVpnPluginUiInterface *plugin, const char *dir)
        test_item ("proxy-http-import-data", s_vpn, NM_OPENVPN_KEY_COMP_LZO, NULL);
        test_item ("proxy-http-import-data", s_vpn, NM_OPENVPN_KEY_FLOAT, NULL);
        test_item ("proxy-http-import-data", s_vpn, NM_OPENVPN_KEY_RENEG_SECONDS, "0");
-       test_item ("proxy-http-import-data", s_vpn, NM_OPENVPN_KEY_REMOTE, "test.server.com");
-       test_item ("proxy-http-import-data", s_vpn, NM_OPENVPN_KEY_PORT, "443");
+       test_item ("proxy-http-import-data", s_vpn, NM_OPENVPN_KEY_REMOTE, "test.server.com:443");
+       test_item ("proxy-http-import-data", s_vpn, NM_OPENVPN_KEY_PORT, "2352");
        test_item ("proxy-http-import-data", s_vpn, NM_OPENVPN_KEY_CERT, NULL);
        test_item ("proxy-http-import-data", s_vpn, NM_OPENVPN_KEY_KEY, NULL);
        test_item ("proxy-http-import-data", s_vpn, NM_OPENVPN_KEY_STATIC_KEY, NULL);
@@ -848,8 +848,8 @@ test_proxy_http_with_auth_import (NMVpnPluginUiInterface *plugin, const char *di
        test_item ("proxy-http-with-auth-import-data", s_vpn, NM_OPENVPN_KEY_COMP_LZO, NULL);
        test_item ("proxy-http-with-auth-import-data", s_vpn, NM_OPENVPN_KEY_FLOAT, NULL);
        test_item ("proxy-http-with-auth-import-data", s_vpn, NM_OPENVPN_KEY_RENEG_SECONDS, "0");
-       test_item ("proxy-http-with-auth-import-data", s_vpn, NM_OPENVPN_KEY_REMOTE, "test.server.com");
-       test_item ("proxy-http-with-auth-import-data", s_vpn, NM_OPENVPN_KEY_PORT, "443");
+       test_item ("proxy-http-with-auth-import-data", s_vpn, NM_OPENVPN_KEY_REMOTE, "test.server.com:443");
+       test_item ("proxy-http-with-auth-import-data", s_vpn, NM_OPENVPN_KEY_PORT, "2352");
        test_item ("proxy-http-with-auth-import-data", s_vpn, NM_OPENVPN_KEY_CERT, NULL);
        test_item ("proxy-http-with-auth-import-data", s_vpn, NM_OPENVPN_KEY_KEY, NULL);
        test_item ("proxy-http-with-auth-import-data", s_vpn, NM_OPENVPN_KEY_STATIC_KEY, NULL);
@@ -891,8 +891,8 @@ test_proxy_socks_import (NMVpnPluginUiInterface *plugin, const char *dir)
        test_item ("proxy-socks-import-data", s_vpn, NM_OPENVPN_KEY_COMP_LZO, NULL);
        test_item ("proxy-socks-import-data", s_vpn, NM_OPENVPN_KEY_FLOAT, NULL);
        test_item ("proxy-socks-import-data", s_vpn, NM_OPENVPN_KEY_RENEG_SECONDS, "0");
-       test_item ("proxy-socks-import-data", s_vpn, NM_OPENVPN_KEY_REMOTE, "test.server.com");
-       test_item ("proxy-socks-import-data", s_vpn, NM_OPENVPN_KEY_PORT, "443");
+       test_item ("proxy-socks-import-data", s_vpn, NM_OPENVPN_KEY_REMOTE, "test.server.com:443");
+       test_item ("proxy-socks-import-data", s_vpn, NM_OPENVPN_KEY_PORT, "2352");
        test_item ("proxy-socks-import-data", s_vpn, NM_OPENVPN_KEY_CERT, NULL);
        test_item ("proxy-socks-import-data", s_vpn, NM_OPENVPN_KEY_KEY, NULL);
        test_item ("proxy-socks-import-data", s_vpn, NM_OPENVPN_KEY_STATIC_KEY, NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]