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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
slapos.core
Commits
fc08bc1b
Commit
fc08bc1b
authored
Sep 15, 2014
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapproxy tests: start external proxy using local ipv4 if provided in env.
parent
ef03a869
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
slapos/tests/slapproxy/__init__.py
slapos/tests/slapproxy/__init__.py
+4
-2
No files found.
slapos/tests/slapproxy/__init__.py
View file @
fc08bc1b
...
...
@@ -865,7 +865,7 @@ class TestMultiMasterSupport(MasterMixin):
def
setUp
(
self
):
# XXX don't use lo
self
.
external_proxy_host
=
'127.0.0.1'
self
.
external_proxy_host
=
os
.
environ
.
get
(
'LOCAL_IPV4'
,
'127.0.0.1'
)
self
.
external_proxy_port
=
8281
self
.
external_master_url
=
'http://%s:%s'
%
(
self
.
external_proxy_host
,
self
.
external_proxy_port
)
self
.
external_computer_id
=
'external_computer'
...
...
@@ -888,11 +888,12 @@ class TestMultiMasterSupport(MasterMixin):
open
(
self
.
external_slapproxy_configuration_file_location
,
'w'
).
write
(
"""[slapos]
computer_id = %(external_computer_id)s
[slapproxy]
host =
127.0.0.1
host =
%(host)s
port = %(port)s
database_uri = %(tempdir)s/lib/external_proxy.db
"""
%
{
'tempdir'
:
self
.
_tempdir
,
'host'
:
self
.
external_proxy_host
,
'port'
:
self
.
external_proxy_port
,
'external_computer_id'
:
self
.
external_computer_id
})
...
...
@@ -901,6 +902,7 @@ database_uri = %(tempdir)s/lib/external_proxy.db
"""
Start external slapproxy
"""
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
self
.
external_proxy_process
=
subprocess
.
Popen
([
'slapos'
,
'proxy'
,
'start'
,
'--cfg'
,
self
.
external_slapproxy_configuration_file_location
])
# Wait a bit for proxy to be started
...
...
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