Commit 39cb7233 authored by Ivan Tyagov's avatar Ivan Tyagov

As it takes certain time for site initialization and installation try

few times before giving up.

See merge request !120
parents 45edd91d 33841fc1
import requests import requests
import unittest import unittest
import os import os
from time import sleep
class TestSiteHttps(unittest.TestCase): class TestSiteHttps(unittest.TestCase):
...@@ -53,11 +54,25 @@ class TestSiteHttps(unittest.TestCase): ...@@ -53,11 +54,25 @@ class TestSiteHttps(unittest.TestCase):
) )
def test_https_erp5_auto_configuration_is_successfull(self): def test_https_erp5_auto_configuration_is_successfull(self):
"""Check that auto configuration was successfull.""" """
result = requests.get( Check that auto configuration was successfull.
self.https_url + '/erp5/ERP5Site_isReady', As it takes certain time for site initialization and installation try
verify=False, allow_redirects=False) few times before giving up.
self.assertTrue(bool(result.content)) """
is_ready = False
for i in range(60):
result = requests.get(
self.https_url + '/erp5/ERP5Site_isReady',
verify=False,
allow_redirects=False)
is_ready = bool(result.content)
if is_ready:
# site is prepared
break
# give some time
sleep(120)
self.assertTrue(is_ready)
@unittest.skip( @unittest.skip(
'Currently HTTPS will reply with "Hostname 172.16.0.9 provided via SNI ' 'Currently HTTPS will reply with "Hostname 172.16.0.9 provided via SNI '
......
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