chore: wait for gateway spool before acceptance

This commit is contained in:
lingniu
2026-07-02 09:11:50 +08:00
parent ea9d9f5d35
commit 0a024f9a76
3 changed files with 72 additions and 2 deletions

View File

@@ -45,6 +45,19 @@ class GoNativeDeployTest(unittest.TestCase):
self.assertIn("--date", command)
self.assertIn("2026-07-02", command)
def test_parse_spool_status_reads_file_and_recent_counts(self):
status = deploy.parse_spool_status("files=42 recent=3")
self.assertEqual(status.files, 42)
self.assertEqual(status.recent, 3)
def test_spool_status_command_targets_gateway_spool_directory(self):
command = deploy.spool_status_command("/opt/lingniu-go-native")
self.assertIn("/opt/lingniu-go-native/spool/gateway", command)
self.assertIn("files=", command)
self.assertIn("recent=", command)
if __name__ == "__main__":
unittest.main()