Closed
Bug 1157545
Opened 10 years ago
Closed 10 years ago
Can't run version-control-tools tests without docker
Categories
(Developer Services :: General, task)
Developer Services
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: glandium, Unassigned)
Details
This is what happens when running run-tests without docker:
Traceback (most recent call last):
File "./run-tests", line 178, in <module>
with docker.auto_clean_orphans():
File "/usr/lib/python2.7/contextlib.py", line 19, in __enter__
raise RuntimeError("generator didn't yield")
RuntimeError: generator didn't yield
This is caused by b2f42c234e8a
| Reporter | ||
Comment 1•10 years ago
|
||
If I apply the following patch, I can get tests to run:
diff --git a/testing/vcttesting/docker.py b/testing/vcttesting/docker.py
--- a/testing/vcttesting/docker.py
+++ b/testing/vcttesting/docker.py
@@ -1119,16 +1119,17 @@ class Docker(object):
yield state
finally:
if start:
self.client.stop(cid)
@contextmanager
def auto_clean_orphans(self):
if not self.is_alive():
+ yield
return
containers = {c['Id'] for c in self.client.containers(all=True)}
images = {i['Id'] for i in self.client.images(all=True)}
try:
yield
finally:
with futures.ThreadPoolExecutor(8) as e:
But that results in 3 errors and 1 failure:
ERROR: test suite for <class 'test_autocomplete.AutocompleteTest'>
(snip)
Exception: Docker is not available.
(snip)
ERROR: test suite for <class 'test-reviewer-selection.AutocompleteTest'>
(snip)
Exception: Docker is not available.
(snip)
ERROR: test suite for <class 'test_login.LoginTest'>
(snip)
Exception: Docker is not available.
(snip)
FAIL: test_transplant_to_try (test_autoland.TestAutoland)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/mozilla/version-control-tools/autoland/tests/test_autoland.py", line 114, in test_transplant_to_try
self.assertEqual(result, '')
AssertionError: '\xe4\xb8\xad\xe6\xad\xa2: \xe3\x83\x91\xe3\x83\x83\xe3\x83\x81 try \xe3\x81\xaf\xe6\x9c\xaa\xe7\x9f\xa5\xe3\x81\xae\xe3\x83\x91\xe3\x83\x83\xe3\x83\x81\xe3\x81\xa7\xe3\x81\x99\n' != ''
----------------------------------------------------------------------
Comment 2•10 years ago
|
||
Comment 3•10 years ago
|
||
@ now has clean test output (all tests needing Docker are skipped) when Docker isn't available.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 4•10 years ago
|
||
The Autoland test is still failing, but it's probably unrelated.
You need to log in
before you can comment on or make changes to this bug.
Description
•