[network-manager-openvpn/th/ping-bgo651657: 7/7] properties/tests: Test import/export of the keepalive option



commit 5e68399354017107c7f2b1dad8853fef789bd9bf
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Jun 18 16:29:09 2015 -0500

    properties/tests: Test import/export of the keepalive option
    
    We import 'keepalive A B' as 'ping A' 'ping-restart B', since that is what openvpn
    does internally.  So, the testing machinery uses exactly the same tests as for
    the normal ping options.

 properties/tests/conf/keepalive.ovpn  |   25 +++++++++++++++++++++++++
 properties/tests/test-import-export.c |    3 +++
 2 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/properties/tests/conf/keepalive.ovpn b/properties/tests/conf/keepalive.ovpn
new file mode 100644
index 0000000..5bd1ed2
--- /dev/null
+++ b/properties/tests/conf/keepalive.ovpn
@@ -0,0 +1,25 @@
+port 2345
+
+remote 173.8.149.245
+resolv-retry infinite
+
+dev tun
+persist-key
+persist-tun
+link-mtu 1400
+proto udp
+nobind
+pull
+tls-client
+
+ca keys/mg8.ca
+cert keys/clee.crt
+key keys/clee.key
+
+tls-auth keys/46.key 1
+tls-remote "/CN=myvpn.company.com"
+
+comp-lzo
+verb 3
+
+keepalive 10 30
diff --git a/properties/tests/test-import-export.c b/properties/tests/test-import-export.c
index d987f51..9a89dcb 100644
--- a/properties/tests/test-import-export.c
+++ b/properties/tests/test-import-export.c
@@ -1180,6 +1180,9 @@ int main (int argc, char **argv)
        test_port_export (plugin, "ping-with-exit-export", test_dir, argv[2], "ping-with-exit.ovpn", 
"ping-with-exit.ovpntest");
        test_port_export (plugin, "ping-with-restart-export", test_dir, argv[2], "ping-with-restart.ovpn", 
"ping-with-restart.ovpntest");
 
+       test_ping_import (plugin, "keepalive", test_dir, "keepalive.ovpn", "10", NULL, "30");
+       test_port_export (plugin, "keepalive", test_dir, argv[2], "keepalive.ovpn", "keepalive.ovpntest");
+
        test_proxy_http_import (plugin, test_dir);
        test_proxy_http_export (plugin, test_dir, argv[2]);
 


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