abctl: the casefold breakdown test's second assertion is unreachable on its own fixture
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 86/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go
- 領域
- cli, testing-qa
調査の方向性
cmd/abctl/cmd_cost_test.go を読み、TestRunCost_ByCurrencyMatchesAUnitSpelledADifferentWay を調べます。特に、1 エントリの Credits fixture と 2 つの assertion を確認してください。どの assertion に到達できないかを確認し、実際に混在した fixture を追加するか、到達不能な assertion を削除して、テストの単一の主張を明確にしてください。このテストでは casefold の動作を正確にカバーし、テストされていないパスを暗示しないようにします。
索引モデルが issue の本文から書いたものです。
説明
Found by the round-3 strict review of #1153, in a test that PR's round 2 added.
cmd/abctl/cmd_cost_test.go, TestRunCost_ByCurrencyMatchesAUnitSpelledADifferentWay:
if strings.Contains(row, mixedCostCell) {
t.Errorf("a real configured unit was withheld as unrecognised:\n%s", row)
}
The fixture carries "currencies":["Credits"] — one entry — so windowUnit returns labelled=true and writeCostBreakdown's default: cost = mixedCostCell arm is unreachable for a priced row. The assertion cannot fire on this input, and its stated reason ("withheld as unrecognised") describes a path the fixture does not reach.
The test's first assertion is live and does pin the property that matters (a unit spelled differently from the reported set keeps its label, i.e. isReportedUnit folds case). Only the negative twin is dead.
Fix is either a second fixture whose window is genuinely mixed, or dropping the assertion and saying in the comment that the single-unit fixture cannot produce (mixed). Prefer whichever keeps the test's one claim legible.
Assisted-By: Claude (Anthropic AI) [email protected]
- 主要言語
- Go
- スター
- 13
- フォーク
- 40
- 平均マージ
- 12時間 10分
- マージ済み PR(30日)
- 191
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rossoctl/cortex のほかの issue
-
ledger: CurrenciesIn's overflow-bound comment names takeLocked; foldLocked holds the reservationオープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
rossoctl/cortex#1161 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
rossoctl/cortex の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
gruntwork-io/boilerplate#329 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
prime-radiant-inc/evener#3291 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Netcracker/qubership-apihub-backend#582 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100