ci(dispatch): 把這批新增的純單元測試補進 -run 白名單(否則 CI 根本沒跑到) - #67
Merged
Conversation
CI 不啟 Docker,service 套件只跑手動維護的 -run 白名單。這批(U/U2/U3)新增的 TestCustomerPushCopy_/TestCustomerRidePushData_/TestNotifyCustomerRide_/ TestPreviewText/TestLostItemPushTitle 都沒在名單上——本機有 Docker 才跑得到, CI 綠燈其實不代表它們跑過。順手補上一直漏掉的 TestRideOfferPushData。 同時在註解寫明這是手動白名單、新增測試要記得補,免得下次又漏。 驗證:以新名單在 CGO_ENABLED=0、無 Docker 條件下跑,28 個測試通過、0.7 秒完成 (真的沒碰 DB)。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
問題
CI 不啟 Docker,
internal/service只跑 workflow 裡手動維護的-run白名單。這批(#61/#62/#63)新增的純單元測試沒有一個在名單上:
TestCustomerPushCopy_白名單(推播型別白名單與 App 端對齊)TestCustomerRidePushData_只帶對帳需要的兩個鍵TestNotifyCustomerRide_*TestPreviewText(rune 截斷,避免中文被切壞)TestLostItemPushTitle(五種標題,含 closed 的兩種說法)也就是說這幾支 PR 的 CI 綠燈,並不代表這些測試跑過——本機有 Docker 才跑得到。
順手補上一直漏掉的
TestRideOfferPushData。做了什麼
-run白名單。驗證
以新名單在
CGO_ENABLED=0、沒有 Docker 的條件下跑:28 個測試通過、0.7 秒完成——0.7 秒也順便證明了它們真的沒碰 DB(碰到的話會去起容器,要 20 秒以上)。
🤖 Generated with Claude Code