diff options
author | kali <kali@leap.se> | 2013-01-24 18:47:41 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2013-01-24 18:47:41 +0900 |
commit | 9cdc193c587631986e579c1ba37a8b982be01238 (patch) | |
tree | 7d1d0b15a10e8ff4e21ca09633781bc471593976 /src/leap/eip/tests | |
parent | 26d1849415402a5aa826c57519d40a19cc67c059 (diff) |
all tests green again
plus:
* added soledad test requirements
* removed soledad from run_tests run (+1K tests failing)
* added option to run All tests to run_tests script
* pep8 cleanup
Diffstat (limited to 'src/leap/eip/tests')
-rw-r--r-- | src/leap/eip/tests/test_config.py | 14 | ||||
-rw-r--r-- | src/leap/eip/tests/test_openvpnconnection.py | 3 |
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() |