Fix docker check failed o/p for multiple exited containers on multiple hosts

Change-Id: If256fe93b608278aeb64f8846580486b8b799989
This commit is contained in:
Sawan Choudhary 2018-05-21 22:54:29 -07:00
parent 6ac1ad253d
commit 40e03ab095
1 changed files with 4 additions and 3 deletions

View File

@ -244,14 +244,15 @@ class operator_scenario(base.Scenario):
line[3] = line[3].replace(' ', '')
line[3] = line[3].replace('(stdout)', '')
if not re.match(r'^\s*$', line[3]):
line[3] = line[3].replace('\\n', ', ')
if docker_failed:
docker_failed = "{}, {}: {}"\
docker_failed = "{}; {}: {}"\
.format(docker_failed,
line[0].strip(),
line[3])
line[3].strip())
else:
docker_failed = "{}: {}".format(line[0].strip(),
line[3])
line[3].strip())
if docker_failed:
return (404, docker_failed, [])
else: