okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
99866a47a
main
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 ): 11def test_the_message_names_the_kept_log (self ): 12with tempfile .TemporaryDirectory ()as tmp : 13ctx = SimpleNamespace (test_timeout = 600 ,components = Path (tmp )) 14component = SimpleNamespace (version = "0.1.54" ) 15exc = updater ._test_start_failure (component , {"error" :"process_exited" ,"state" :"failed" },ctx ," | boom" ) 16text = str (exc ) 17self .assertIn ("test-start-0.1.54.log" ,text ) 18self .assertIn ("strata update --force" ,text ) 19self .assertNotIn ("boom" ,text )# the engine's own words stay out of the sentence 20 21 22if __name__ == "__main__" : 23unittest .main ()