Skip to content

test: api/routes/api_keys.py カバレッジ向上(74%→90%+)#91

Closed
fukukei23 wants to merge 3 commits into
mainfrom
test/issue-90-api-keys-coverage
Closed

test: api/routes/api_keys.py カバレッジ向上(74%→90%+)#91
fukukei23 wants to merge 3 commits into
mainfrom
test/issue-90-api-keys-coverage

Conversation

@fukukei23
Copy link
Copy Markdown
Owner

Summary

  • src/nexuscore/api/routes/api_keys.py のテストカバレッジを 74.23% → 90%+ に向上
  • 9テスト追加: エラーパス・エッジケース網羅
  • カバー範囲: invalid user_id (L51-53), SQLAlchemyError rollback (L151-154, L291-294), unexpected Exception (L160-161, L222-227, L296-301)

Test plan

  • 新規9テスト全て通過
  • フルスイート 5466 passed, 0 failed(回帰なし)

Closes #90

🤖 Generated with Claude Code

Codex CLI and others added 3 commits April 27, 2026 14:29
リファクタリング(1be87e1, 005726b)でモジュールが移動されたが、
テストファイルとソースファイル内のインポートパスが更新されていなかった。

主な修正:
- agents → analyzer/config/guard/services/utils への移動に対応
- gradio_app/modules/ui/ventures → archive/ への移動に対応
- mock.patch()内のパスも含め全て更新

テスト結果: 5441 passed, 0 failed(修正前: 48 collection errors)

Closes #84

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
未カバー行のテスト15件を追加:
- analyze_requirement の空入力フォールバック/JSON パース失敗
- generate_final_spec の正常系/エッジケース
- TextLocalization の多言語/未知キー/未知言語
- StateMachine の初期化/トランジション
- headless モード/Gradio未インストール時のフォールバック

テスト結果: 5457 passed, 0 failed(+15テスト、回帰なし)

Closes #88

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
9テスト追加: _get_user_id_from_auth invalid user_id (3),
SQLAlchemyError rollback paths (3), unexpected Exception fallbacks (3)

Closes #90

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@fukukei23 fukukei23 force-pushed the test/issue-90-api-keys-coverage branch from 40cd211 to d202791 Compare May 7, 2026 03:11
@fukukei23
Copy link
Copy Markdown
Owner Author

Closing: main has diverged significantly (92+ commits of refactoring). Merge conflicts in most files. Will re-implement needed tests on current main when NexusCore becomes active again.

@fukukei23 fukukei23 closed this May 21, 2026
@fukukei23 fukukei23 deleted the test/issue-90-api-keys-coverage branch May 21, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: api/routes/api_keys.py カバレッジ向上(74%→90%+)

1 participant