Pass over a data source whose script the image cannot run
This commit is contained in:
@@ -632,7 +632,9 @@ class ContainersTest(unittest.TestCase):
|
||||
|
||||
def test_a_run_whose_command_never_started_is_a_failure_that_says_what_docker_printed(self):
|
||||
for code in (125, 126, 127):
|
||||
self.assertEqual(ran_tests(self.containers(run=Ran(code, "sh: gotestsum: not found\n")), "/tree"), Failure(f"docker run could not start its command, and exited {code}: sh: gotestsum: not found"))
|
||||
ran = ran_tests(self.containers(run=Ran(code, "sh: gotestsum: not found\n")), "/tree")
|
||||
self.assertIsInstance(ran, Failure)
|
||||
self.assertEqual(ran.reason, f"docker run could not start its command, and exited {code}: sh: gotestsum: not found")
|
||||
self.assertEqual(ran_tests(self.containers(run=Ran(124, "late")), "/tree"), Ran(124, "late"))
|
||||
self.assertEqual(ran_tests(self.containers(run=Ran(128, "killed")), "/tree"), Ran(128, "killed"))
|
||||
self.assertEqual(fix_attempted(self.containers(run=Ran(125, "")), "/tree", "got 3", self.stream), Failure(f"docker run could not start its command, and exited 125; its errors are in {self.stream.with_suffix('.stderr')}"))
|
||||
|
||||
Reference in New Issue
Block a user