okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge f-029-urgent (bc694233b)99866a47a

main
937 B23 linesraw
1"""#4692: a failed one-token test start says where the kept engine log is (it said "report it with the log" and named none)."""
2import tempfile
3import unittest
4from pathlib import Path
5from types import SimpleNamespace
6
7from strata_control import updater
8
9
10class ProbeHint(unittest.TestCase):
11    def test_the_message_names_the_kept_log(self):
12        with tempfile.TemporaryDirectory() as tmp:
13            ctx = SimpleNamespace(test_timeout=600, components=Path(tmp))
14            component = SimpleNamespace(version="0.1.54")
15            exc = updater._test_start_failure(component, {"error": "process_exited", "state": "failed"}, ctx, " | boom")
16        text = str(exc)
17        self.assertIn("test-start-0.1.54.log", text)
18        self.assertIn("strata update --force", text)
19        self.assertNotIn("boom", text)                      # the engine's own words stay out of the sentence
20
21
22if __name__ == "__main__":
23    unittest.main()