Commit 58fa7d34 authored by Cédric de Saint Martin's avatar Cédric de Saint Martin Committed by Rafael Monnerat

fixup! slapproxy test: use current running code to start external proxy.

parent a751aeb4
...@@ -906,10 +906,13 @@ database_uri = %(tempdir)s/lib/external_proxy.db ...@@ -906,10 +906,13 @@ database_uri = %(tempdir)s/lib/external_proxy.db
logging.getLogger().info('Starting external proxy, listening to %s:%s' % (self.external_proxy_host, self.external_proxy_port)) logging.getLogger().info('Starting external proxy, listening to %s:%s' % (self.external_proxy_host, self.external_proxy_port))
# XXX This uses a hack to run current code of slapos.core # XXX This uses a hack to run current code of slapos.core
import slapos import slapos
self.external_proxy_process = subprocess.Popen([ self.external_proxy_process = subprocess.Popen(
[
sys.executable, '%s/cli/entry.py' % os.path.dirname(slapos.__file__), sys.executable, '%s/cli/entry.py' % os.path.dirname(slapos.__file__),
'proxy', 'start', '--cfg', self.external_slapproxy_configuration_file_location 'proxy', 'start', '--cfg', self.external_slapproxy_configuration_file_location
]) ],
env={"PYTHONPATH": ':'.join(sys.path)}
)
# Wait a bit for proxy to be started # Wait a bit for proxy to be started
attempts = 0 attempts = 0
while (attempts < 20): while (attempts < 20):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment