-
Notifications
You must be signed in to change notification settings - Fork 0
handlerのPostGamePlayLogStart実装 #1395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Migrate lint ✅ Lint output |
1 similar comment
|
Migrate lint ✅ Lint output |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1395 +/- ##
==========================================
+ Coverage 50.00% 50.15% +0.15%
==========================================
Files 135 135
Lines 11810 11840 +30
==========================================
+ Hits 5905 5938 +33
+ Misses 5601 5598 -3
Partials 304 304 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mathsuky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a small comment
テストの書き方など勉強になりました:pray:
- レスポンスがAPI仕様を見たすことを確認
- Service層の返り値を必要十分にvalidationすることを確認
- テストケースの網羅性を確認
|
|
||
| playLogID := values.NewGamePlayLogID() | ||
|
|
||
| testCases := map[string]struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
リクエストボディが不正であるようなケース(400のケース)のテストはしなくても良いのでしょうか
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あった方がいいです。
mathsuky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
User description
fix #1384
PR Type
Enhancement, Tests
Description
ゲーム起動ログ開始ハンドラ実装
既存サービス連携とID変換
エラーハンドリングとHTTP応答整備
単体テスト追加とケース網羅
Diagram Walkthrough
flowchart LR Handler["POST /editions/{editionID}/games/{gameID}/plays/start"] --> Parse["Body/Path解析"] Parse --> Service["GamePlayLogV2.CreatePlayLog"] Service -- 成功 --> Response["201 Created + PlayLogID"] Service -- ErrInvalidEdition/Game/Version --> NotFound["404 Not Found"] Service -- その他エラー --> Internal["500 Internal Server Error"]File Walkthrough
game_play_log.go
起動ログ開始ハンドラの本実装src/handler/v2/game_play_log.go
game_play_log_test.go
起動ログ開始ハンドラのテスト追加src/handler/v2/game_play_log_test.go