summaryrefslogtreecommitdiff
path: root/src/leap/eip
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/eip')
-rw-r--r--src/leap/eip/openvpnconnection.py34
-rw-r--r--src/leap/eip/tests/test_eipconnection.py8
2 files changed, 13 insertions, 29 deletions
diff --git a/src/leap/eip/openvpnconnection.py b/src/leap/eip/openvpnconnection.py
index 4a6a495a..ec8b48bf 100644
--- a/src/leap/eip/openvpnconnection.py
+++ b/src/leap/eip/openvpnconnection.py
@@ -57,16 +57,16 @@ to be triggered for each one of them.
self.proto = None
##################################
- # XXX move all error messages
- # into a more encapsulated object.
- self.missing_pkexec = False
- self.missing_auth_agent = False
-
- self.bad_keyfile_perms = False
- self.missing_vpn_keyfile = False
- self.missing_provider = False
- self.missing_definition = False
- self.bad_provider = False
+ # This is handled by Exception attrs
+ # now (see #504)
+ #self.missing_pkexec = False
+ #self.missing_auth_agent = False
+
+ #self.bad_keyfile_perms = False
+ #self.missing_vpn_keyfile = False
+ #self.missing_provider = False
+ #self.missing_definition = False
+ #self.bad_provider = False
#################################
#XXX workaround for signaling
@@ -107,27 +107,17 @@ to be triggered for each one of them.
except eip_exceptions.EIPNoPolkitAuthAgentAvailable:
command = args = None
# XXX deprecate
- self.missing_auth_agent = True
+ #self.missing_auth_agent = True
raise
except eip_exceptions.EIPNoPkexecAvailable:
command = args = None
- self.missing_pkexec = True
+ #self.missing_pkexec = True
raise
# XXX if not command, signal error.
self.command = command
self.args = args
- def _get_or_create_config(self):
- """
- retrieves the config options from defaults or
- home file, or config file passed in command line.
- populates command and args to be passed to subprocess.
- """
- # XXX does nothing.
- # XXX should get config? or get from checker?
- pass
-
def _check_vpn_keys(self):
"""
checks for correct permissions on vpn keys
diff --git a/src/leap/eip/tests/test_eipconnection.py b/src/leap/eip/tests/test_eipconnection.py
index 23f645c3..ce9d39e2 100644
--- a/src/leap/eip/tests/test_eipconnection.py
+++ b/src/leap/eip/tests/test_eipconnection.py
@@ -27,9 +27,6 @@ class NotImplementedError(Exception):
@patch('OpenVPNConnection._get_or_create_config')
@patch('OpenVPNConnection._set_ovpn_command')
class MockedEIPConnection(EIPConnection):
- def _get_or_create_config(self):
- self._set_ovpn_command()
-
def _set_ovpn_command(self):
self.command = "mock_command"
self.args = [1, 2, 3]
@@ -64,6 +61,7 @@ class EIPConductorTest(BaseLeapTest):
# some methods mocked
self.manager = Mock(name="openvpnmanager_mock")
self.con = MockedEIPConnection()
+ self.con.run_openvpn_checks()
def tearDown(self):
del self.con
@@ -78,10 +76,6 @@ class EIPConductorTest(BaseLeapTest):
"""
con = self.con
self.assertEqual(con.autostart, True)
- self.assertEqual(con.missing_pkexec, False)
- self.assertEqual(con.missing_vpn_keyfile, False)
- self.assertEqual(con.missing_provider, False)
- self.assertEqual(con.bad_provider, False)
def test_ovpn_command(self):
"""