mirror of
https://github.com/tiennm99/miti99bot.git
synced 2026-06-08 20:14:23 +00:00
b3dea5fe21
Phase 5 of the 2026-05-09 review remediation plan. Closes the handler-layer test gap (5 modules at 0% coverage in the audit) and ends the storage-package's CI t.Skip on Firestore emulator tests. - internal/testutil: Update fixture builders (NewPrivateMessage, NewGroupMessage, NewSupergroupMessage, NewChannelMessage) plus a RecordingBot that wraps the real go-telegram/bot.Bot with an httptest server. The bot library hits the test server instead of Telegram; multipart form fields are captured per call. Tests assert on Sent() / LastSent() / AssertSentText(). - Handler tests added: misc (4), util (7), wordle (10), loldle (9), loldleemoji (8). Cover happy paths, error paths, auth gates, group-vs-private subject keying, KV side effects. - Coverage 44.7% -> 69.8% (verified via -coverprofile). All packages now report coverage in CI output. - CI: ci.yml installs cloud-firestore-emulator beta component and starts it on localhost:8090 before go test. Sets FIRESTORE_EMULATOR_HOST + GOOGLE_CLOUD_PROJECT env so the storage package's emulator-gated tests execute instead of skipping. go test -race -count=1 ./... clean across all 15 packages locally.