summaryrefslogtreecommitdiff
path: root/src/leap/eip/tests/test_config.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-08-30 06:06:36 +0900
committerkali <kali@leap.se>2012-08-30 06:06:36 +0900
commit3c59f021dde265bc314cd6b52d3aafbb8532b1ec (patch)
treedba7f051a2de2207909dfb163fea75e07596fe5b /src/leap/eip/tests/test_config.py
parent5e77b77765154850fb708e6ea188fcf7ba99fdce (diff)
parentd4de193b52881590c07468bdfece5f82fa48840d (diff)
Merge branch 'feature/ovpn-no-config' into develop
closes #447 deprecates the use of config files; all options are passed to openvpn as command line arguments.
Diffstat (limited to 'src/leap/eip/tests/test_config.py')
-rw-r--r--src/leap/eip/tests/test_config.py46
1 files changed, 41 insertions, 5 deletions
diff --git a/src/leap/eip/tests/test_config.py b/src/leap/eip/tests/test_config.py
index 16219648..87ef33ef 100644
--- a/src/leap/eip/tests/test_config.py
+++ b/src/leap/eip/tests/test_config.py
@@ -48,6 +48,22 @@ class EIPConfigTest(BaseLeapTest):
username = self.get_username()
groupname = self.get_groupname()
+ args.append('--client')
+ args.append('--dev')
+ #does this have to be tap for win??
+ args.append('tun')
+ args.append('--persist-tun')
+ args.append('--persist-key')
+ args.append('--remote')
+ args.append('testprovider.example.org')
+ # XXX get port!?
+ args.append('1194')
+ # XXX get proto
+ args.append('udp')
+ args.append('--tls-client')
+ args.append('--remote-cert-tls')
+ args.append('server')
+
args.append('--user')
args.append(username)
args.append('--group')
@@ -55,16 +71,36 @@ class EIPConfigTest(BaseLeapTest):
args.append('--management-client-user')
args.append(username)
args.append('--management-signal')
- args.append('--management')
+ args.append('--management')
#XXX hey!
#get platform switches here!
args.append('/tmp/.eip.sock')
args.append('unix')
- args.append('--config')
- args.append(os.path.expanduser(
- '~/.config/leap/providers/%s/openvpn.conf'
- % constants.DEFAULT_TEST_PROVIDER))
+
+ # certs
+ # XXX get values from specs?
+ args.append('--cert')
+ args.append(os.path.join(
+ self.home,
+ '.config', 'leap', 'providers',
+ 'testprovider.example.org',
+ 'keys', 'client',
+ 'openvpn.pem'))
+ args.append('--key')
+ args.append(os.path.join(
+ self.home,
+ '.config', 'leap', 'providers',
+ 'testprovider.example.org',
+ 'keys', 'client',
+ 'openvpn.pem'))
+ args.append('--ca')
+ args.append(os.path.join(
+ self.home,
+ '.config', 'leap', 'providers',
+ 'testprovider.example.org',
+ 'keys', 'ca',
+ 'testprovider-ca-cert.pem'))
return args
# build command string