Merge "Armada timeout adjustment"
This commit is contained in:
commit
fa0af775d5
@ -19,6 +19,7 @@ from oslo_log import log as logging
|
||||
|
||||
from armada import api
|
||||
from armada.common import policy
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -110,7 +110,8 @@ class GitTestCase(base.ArmadaTestCase):
|
||||
source.download_tarball(url)
|
||||
|
||||
mock_temp.mkstemp.assert_called_once()
|
||||
mock_requests.get.assert_called_once_with(url, timeout=5, verify=False)
|
||||
mock_requests.get.assert_called_once_with(
|
||||
url, timeout=None, verify=False)
|
||||
mock_open.assert_called_once_with('/tmp/armada', 'wb')
|
||||
mock_open().write.assert_called_once_with(
|
||||
mock_requests.get(url).content)
|
||||
|
@ -135,7 +135,7 @@ def download_tarball(tarball_url, verify=False, proxy_server=None):
|
||||
}
|
||||
tarball_filename = tempfile.mkstemp(prefix='armada')[1]
|
||||
response = requests.get(
|
||||
tarball_url, timeout=5, verify=verify, **kwargs)
|
||||
tarball_url, timeout=None, verify=verify, **kwargs)
|
||||
|
||||
with open(tarball_filename, 'wb') as f:
|
||||
f.write(response.content)
|
||||
|
@ -177,6 +177,6 @@ def validate_armada_documents(documents):
|
||||
|
||||
def validate_manifest_url(value):
|
||||
try:
|
||||
return (requests.get(value, timeout=5).status_code == 200)
|
||||
return (requests.get(value, timeout=None).status_code == 200)
|
||||
except requests.exceptions.RequestException:
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user