summaryrefslogtreecommitdiff
path: root/src/leap/eip/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/eip/tests')
-rw-r--r--src/leap/eip/tests/test_config.py14
-rw-r--r--src/leap/eip/tests/test_openvpnconnection.py3
2 files changed, 16 insertions, 1 deletions
diff --git a/src/leap/eip/tests/test_config.py b/src/leap/eip/tests/test_config.py
index 5977ef3c..05e78de4 100644
--- a/src/leap/eip/tests/test_config.py
+++ b/src/leap/eip/tests/test_config.py
@@ -28,6 +28,8 @@ class EIPConfigTest(BaseLeapTest):
__name__ = "eip_config_tests"
provider = "testprovider.example.org"
+ maxDiff = None
+
def setUp(self):
pass
@@ -130,6 +132,18 @@ class EIPConfigTest(BaseLeapTest):
args.append('/tmp/test.socket')
args.append('unix')
+ args.append('--script-security')
+ args.append('2')
+
+ if _system == "Linux":
+ args.append('--up')
+ args.append('/etc/leap/resolv-update')
+ args.append('--down')
+ args.append('/etc/leap/resolv-update')
+ args.append('--plugin')
+ args.append('/usr/lib/openvpn/openvpn-down-root.so')
+ args.append("'script_type=down /etc/leap/resolv-update'")
+
# certs
# XXX get values from specs?
args.append('--cert')
diff --git a/src/leap/eip/tests/test_openvpnconnection.py b/src/leap/eip/tests/test_openvpnconnection.py
index f7493567..95bfb2f0 100644
--- a/src/leap/eip/tests/test_openvpnconnection.py
+++ b/src/leap/eip/tests/test_openvpnconnection.py
@@ -91,9 +91,10 @@ class OpenVPNConnectionTest(BaseLeapTest):
# while fixing. kali.
openvpn_connection = openvpnconnection.OpenVPNConnection()
- with patch.object(psutil, "get_process_list") as mocked_psutil:
+ with patch.object(psutil, "process_iter") as mocked_psutil:
mocked_process = Mock()
mocked_process.name = "openvpn"
+ mocked_process.cmdline = ["openvpn", "-foo", "-bar", "-gaaz"]
mocked_psutil.return_value = [mocked_process]
with self.assertRaises(eipexceptions.OpenVPNAlreadyRunning):
openvpn_connection._check_if_running_instance()