fix(docker): surface enumeration failures
prd-number-check / require-numbered-prds (pull_request) Successful in 26s
lint / lint (push) Successful in 1m2s
tracker-policy-pr / check-pr (pull_request) Failing after 29s
test / unit (pull_request) Successful in 1m0s
test / integration-docker (pull_request) Successful in 1m18s
test / image-input-builds (pull_request) Successful in 1m23s
test / coverage (pull_request) Failing after 14s

This commit is contained in:
2026-07-26 22:27:59 +00:00
parent 91d0761a3b
commit 90097a50ee
4 changed files with 62 additions and 24 deletions
+13
View File
@@ -69,6 +69,19 @@ class TestComposeProjectListing(unittest.TestCase):
self.assertEqual([], list_active_slugs(warn_on_error=False))
warn.assert_not_called()
def test_compose_ls_error_can_be_raised_for_enumeration(self):
with mock.patch(
"bot_bottle.backend.docker.compose.subprocess.run",
return_value=subprocess.CompletedProcess(
args=["docker"], returncode=1, stdout="", stderr="no daemon",
),
):
with self.assertRaisesRegex(RuntimeError, "no daemon"):
list_active_slugs(
warn_on_error=False,
raise_on_error=True,
)
if __name__ == "__main__":
unittest.main()