summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/runner/lib/classification.py2
-rw-r--r--test/runner/lib/core_ci.py6
-rw-r--r--test/runner/lib/http.py12
-rw-r--r--test/runner/lib/manage_ci.py13
4 files changed, 24 insertions, 9 deletions
diff --git a/test/runner/lib/classification.py b/test/runner/lib/classification.py
index f28b653514..381a5a62a6 100644
--- a/test/runner/lib/classification.py
+++ b/test/runner/lib/classification.py
@@ -260,7 +260,7 @@ class PathMapper(object):
return minimal
if path.startswith('lib/ansible/module_utils/'):
- if ext == '.ps1':
+ if ext in ('.ps1', '.psm1'):
return {
'windows-integration': self.integration_all_target,
}
diff --git a/test/runner/lib/core_ci.py b/test/runner/lib/core_ci.py
index 826c332b75..d154254e72 100644
--- a/test/runner/lib/core_ci.py
+++ b/test/runner/lib/core_ci.py
@@ -181,7 +181,7 @@ class AnsibleCoreCI(object):
raise self._create_http_error(response)
- def get(self, tries=2, sleep=10, always_raise_on=None):
+ def get(self, tries=3, sleep=15, always_raise_on=None):
"""
Get instance connection information.
:type tries: int
@@ -290,8 +290,8 @@ class AnsibleCoreCI(object):
'Content-Type': 'application/json',
}
- tries = 2
- sleep = 10
+ tries = 3
+ sleep = 15
while True:
tries -= 1
diff --git a/test/runner/lib/http.py b/test/runner/lib/http.py
index 1f2c377536..9ce433127d 100644
--- a/test/runner/lib/http.py
+++ b/test/runner/lib/http.py
@@ -86,7 +86,7 @@ class HttpClient(object):
stdout, _ = run_command(self.args, cmd, capture=True, always=self.always, cmd_verbosity=2)
if self.args.explain and not self.always:
- return HttpResponse(200, '')
+ return HttpResponse(method, url, 200, '')
header, body = stdout.split('\r\n\r\n', 1)
@@ -95,16 +95,20 @@ class HttpClient(object):
http_response = first_line.split(' ')
status_code = int(http_response[1])
- return HttpResponse(status_code, body)
+ return HttpResponse(method, url, status_code, body)
class HttpResponse(object):
"""HTTP response from curl."""
- def __init__(self, status_code, response):
+ def __init__(self, method, url, status_code, response):
"""
+ :type method: str
+ :type url: str
:type status_code: int
:type response: str
"""
+ self.method = method
+ self.url = url
self.status_code = status_code
self.response = response
@@ -115,7 +119,7 @@ class HttpResponse(object):
try:
return json.loads(self.response)
except ValueError:
- raise HttpError(self.status_code, 'Cannot parse response as JSON:\n%s' % self.response)
+ raise HttpError(self.status_code, 'Cannot parse response to %s %s as JSON:\n%s' % (self.method, self.url, self.response))
class HttpError(ApplicationError):
diff --git a/test/runner/lib/manage_ci.py b/test/runner/lib/manage_ci.py
index d1063e4029..b3bb0409d3 100644
--- a/test/runner/lib/manage_ci.py
+++ b/test/runner/lib/manage_ci.py
@@ -110,7 +110,18 @@ class ManagePosixCI(object):
:type core_ci: AnsibleCoreCI
"""
self.core_ci = core_ci
- self.ssh_args = ['-o', 'BatchMode=yes', '-o', 'StrictHostKeyChecking=no', '-i', self.core_ci.ssh_key.key]
+ self.ssh_args = ['-i', self.core_ci.ssh_key.key]
+
+ ssh_options = dict(
+ BatchMode='yes',
+ StrictHostKeyChecking='no',
+ UserKnownHostsFile='/dev/null',
+ ServerAliveInterval=15,
+ ServerAliveCountMax=4,
+ )
+
+ for ssh_option in sorted(ssh_options):
+ self.ssh_args += ['-o', '%s=%s' % (ssh_option, ssh_options[ssh_option])]
if self.core_ci.platform == 'freebsd':
self.become = ['su', '-l', 'root', '-c']