Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
17
Merge Requests
17
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
02752056
Commit
02752056
authored
Sep 15, 2014
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapproxy test: use current running code to start external proxy.
parent
fc08bc1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
slapos/tests/slapproxy/__init__.py
slapos/tests/slapproxy/__init__.py
+7
-2
No files found.
slapos/tests/slapproxy/__init__.py
View file @
02752056
...
@@ -34,6 +34,7 @@ import logging
...
@@ -34,6 +34,7 @@ import logging
import
shutil
import
shutil
import
socket
import
socket
import
subprocess
import
subprocess
import
sys
import
tempfile
import
tempfile
import
time
import
time
import
unittest
import
unittest
...
@@ -903,8 +904,12 @@ database_uri = %(tempdir)s/lib/external_proxy.db
...
@@ -903,8 +904,12 @@ database_uri = %(tempdir)s/lib/external_proxy.db
Start external slapproxy
Start external slapproxy
"""
"""
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 use current dev version, not standard one installed through package
# XXX This uses a hack to run current code of slapos.core
self
.
external_proxy_process
=
subprocess
.
Popen
([
'slapos'
,
'proxy'
,
'start'
,
'--cfg'
,
self
.
external_slapproxy_configuration_file_location
])
import
slapos
self
.
external_proxy_process
=
subprocess
.
Popen
([
sys
.
executable
,
'%s/cli/entry.py'
%
os
.
path
.
dirname
(
slapos
.
__file__
),
'proxy'
,
'start'
,
'--cfg'
,
self
.
external_slapproxy_configuration_file_location
])
# 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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment