Skip to content

Add build-time validation for injector fields#11

Merged
kenichirow merged 1 commit intomainfrom
feature/build-time-validation
Feb 16, 2026
Merged

Add build-time validation for injector fields#11
kenichirow merged 1 commit intomainfrom
feature/build-time-validation

Conversation

@kenichirow
Copy link
Owner

Summary

  • do_build_matcher/1 の各句で validate_injector!/1 を呼び出し、不正な設定値を構築時に ArgumentError で検出
  • percentage(0..100)、resp_delay(非負整数)、resp_status(正の整数)をバリデーション
  • resp_handler の冗長な || nil を削除

Test plan

  • percentage: -1, 101, "50" → ArgumentError
  • resp_delay: -1 → ArgumentError
  • resp_status: -1 → ArgumentError
  • SlowInjector, RejectInjector, plain map での不正値テスト
  • 既存テスト全39件通過

Closes #34

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kenichirow kenichirow merged commit a1b5ec9 into main Feb 16, 2026
1 check passed
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