Commit 5770e533 authored by Jérome Perrin's avatar Jérome Perrin

Fix jstesnode software release test random failure

Fix this random failure we sometimes have, like [here](https://nexedijs.erp5.net/#/test_result_module/20200414-44DF7D23/11) by adding a promise so that test does not try to connect to a nginx that's not started yet

```
======================================================================
ERROR: test (test.TestJSTestNode)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "parts/slapos-repository/software/jstestnode/test/test.py", line 60, in test
    '%sjio/test/tests.html' % (connection_dict['nginx'], ), allow_redirects=False)
  File "eggs/requests-2.20.0-py2.7.egg/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "eggs/requests-2.20.0-py2.7.egg/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "eggs/requests-2.20.0-py2.7.egg/requests/sessions.py", line 524, in request
    resp = self.send(prep, **send_kwargs)
  File "eggs/requests-2.20.0-py2.7.egg/requests/sessions.py", line 637, in send
    r = adapter.send(request, **kwargs)
  File "eggs/requests-2.20.0-py2.7.egg/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='::1', port=9443): Max retries exceeded with url: /jio/test/tests.html (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9b01f4b310>: Failed to establish a new connection: [Errno 111] Connection refused',))

```

See merge request !733
parents 4f1be677 99a47e8b
......@@ -15,7 +15,7 @@
[instance]
filename = instance.cfg.in
md5sum = e6203cba0084289edec2176b185d3427
md5sum = 42e7d1825f5582fbe2c55977e5abc574
[template-nginx-service]
filename = template-nginx-service.sh.in
......
......@@ -2,6 +2,7 @@
parts =
nginx-service
runTestSuite-instance
promises
publish
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
......@@ -22,6 +23,7 @@ log = $${:var}/log
varnginx = $${:var}/nginx
scripts = $${:etc}/run
services = $${:etc}/service
promise = $${:etc}/promise
www = $${:srv}/www
home = $${:etc}/home
ssl = $${:etc}/ssl
......@@ -51,15 +53,20 @@ recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line =
${xserver:location}/bin/Xvfb
$${:display}
:$${:display}
-screen 0 1024x768x24
-fbdir $${directory:framebuffer}
environment =
XORG_LOCK_DIR=$${:lock-dir}
display = :0
display = 0
lock-dir = $${directory:run}
[xvfb-promise]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:promise}/$${:_buildout_section_name_}
command-line = bash -c "[ -S $${xvfb-instance:lock-dir}/.X11-unix/X$${xvfb-instance:display} ]"
#################################
# Nginx service
......@@ -85,14 +92,27 @@ ssl_key = $${directory:ssl}/nginx.key
ssl_csr = $${directory:ssl}/nginx.csr
ssl_crt = $${directory:ssl}/nginx.crt
[nginx-listen-promise]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promise}/$${:_buildout_section_name_}
hostname = $${nginx-configuration:ip}
port = $${nginx-configuration:port}
#################################
# SlapOS service
#################################
[instance-parameter]
recipe = slapos.cookbook:slapconfiguration
computer = $${slap_connection:computer_id}
partition = $${slap_connection:partition_id}
url = $${slap_connection:server_url}
key = $${slap_connection:key_file}
cert = $${slap_connection:cert_file}
configuration._ = {}
\ No newline at end of file
computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
configuration._ = {}
[promises]
recipe =
depends =
$${nginx-listen-promise:recipe}
$${xvfb-promise:recipe}
\ No newline at end of file
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