Skip to content

test: oauth_client + handler unit tests (490 total)#33

Merged
jeong-sik merged 1 commit intomainfrom
test/coverage-boost
Mar 17, 2026
Merged

test: oauth_client + handler unit tests (490 total)#33
jeong-sik merged 1 commit intomainfrom
test/coverage-boost

Conversation

@jeong-sik
Copy link
Owner

Summary

테스트 커버리지 확대. 전용 테스트가 없던 2개 핵심 모듈에 단위 테스트 추가.

test_oauth_client.ml (19 tests)

  • credential store: empty, save/load, clear, isolation (2개 store 독립성)
  • PKCE: pair 생성, URL-safe 문자, 유니크성
  • authorization URL: 기본 파라미터, resource 파라미터, 특수문자 인코딩
  • state parameter: 포맷, exact match, mismatch, 길이 불일치, empty 케이스
  • bearer token: 주입, 기존 헤더 보존
  • config: default_max_response_size 값 검증

test_handler.ml (21 tests)

  • create/accessors: name, version, instructions, empty collections
  • registration: tool/resource/prompt 추가, 중복 tool 교체
  • capabilities: 빈 상태, tool 있는 상태
  • dispatch: initialize, ping, tools/list, tools/call, unknown tool, unknown method, notification
  • helpers: parse_list_field (성공/실패/드롭), build_initialize_params

Test plan

  • 40개 신규 테스트 통과
  • 전체 490개 테스트, 0 FAIL

🤖 Generated with Claude Code

- test_oauth_client.ml (19 tests): credential store CRUD/isolation,
  PKCE generation/uniqueness/url-safety, authorization URL construction
  with encoding, state parameter generation/validation, bearer token
  injection, default_max_response_size
- test_handler.ml (21 tests): create/accessors, tool/resource/prompt
  registration, duplicate tool replacement, capabilities, dispatch
  (initialize/ping/tools-list/tools-call/unknown method/notification),
  parse_list_field, build_initialize_params

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jeong-sik jeong-sik merged commit 89169af into main Mar 17, 2026
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.

1 participant