fix: レスキューの時刻をゾーン情報に依存せず返し、テストを実効化する - #540
Merged
Merged
Conversation
LoadLocation はゾーン情報を読めない環境で黙って UTC に落ち、#535 で直した 9時間ズレがそのまま再発する。日本標準時は夏時間を持たないので固定オフセットにする。 あわせて、実装が壊れても緑のままだったテスト2本を、リテラルの期待値と 変換エラーの確認に置き換える。
|
Warning Review limit reachedNext included review available in 25 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Close #539
PR #537 で入れたJST変換と、そのテストの穴を塞ぐ。挙動が変わるのは、ゾーン情報を読めない環境での表示だけ。
1. ゾーンの取得を固定オフセットにする
日本標準時は夏時間を持たないため、固定オフセットで正しく表せる。フォールバックの分岐自体が無くなるので、静かに壊れる経路が消える。
2. 失敗しえないテスト2本を直す
前者は実装が
t.In(x).Format(y)の形である限り必ず一致し、UTCに落ちた状態でも緑になっていた。後者はバリデーションより先にSQLを投げる実装に変えても、sqlmockが未宣言クエリでエラーを返すため緑のままだった。テスト