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

parent 943a9d90
...@@ -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