Merged
Conversation
- handler.go: GET /health エンドポイントを追加(JSON形式でstatus/service/uptime/timestampを返す) - handler_test.go: TestHealthEndpoint テストを追加 - store_test.go: 新規作成 - Store メソッドの直接テスト・並行テストを追加 - TestNewStore, TestCreateListAndGetList, TestGetListNonExistent - TestAddItemToNonExistentList, TestAddItemAndRetrieve - TestDeleteListReturnValues, TestUniqueTokens - TestConcurrentCreateList, TestConcurrentAddItem (race condition 検証) - TestGetEnv - カバレッジ: 83.8% → 89.7% に向上 Closes #11
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.
変更概要
GET /healthエンドポイントを新規追加(コンテナ/K8s対応)store_test.goを新規作成してStoreメソッドを直接テスト詳細
新機能: /health エンドポイント
status,service,uptime,timestamp新規 store_test.go
TestNewStore/TestCreateListAndGetList/TestGetListNonExistentTestAddItemToNonExistentList/TestAddItemAndRetrieveTestDeleteListReturnValues/TestUniqueTokensTestConcurrentCreateList/TestConcurrentAddItem(並行テスト)TestGetEnv(環境変数読み取り関数のテスト)対応 Issue
Closes #11
動作確認手順
go test -v -race ./...で全テストがパスすることを確認go test -coverprofile=coverage.out ./... && go tool cover -func=coverage.outでカバレッジ確認curl http://localhost:8080/healthでJSONレスポンスを確認