Commit c33eb1b
test: add unit tests for header validation fixes
Add standalone test-runner with 7 tests covering both interceptor fixes:
CompressedResponseSizeInterceptor (AZ02):
- brokenInterceptor_failsWithArabicLocale: proves locale-dependent formatting crashes
- fixedInterceptor_succeedsWithArabicLocale: proves Locale.US fix works
- fixedInterceptor_succeedsWithUSLocale: regression test
BearerTokenInterceptor (AYPW):
- brokenInterceptor_failsWithControlCharInToken: proves corrupt tokens crash
- fixedInterceptor_succeedsWithControlCharInToken: proves sanitization works
- fixedInterceptor_skipsHeaderWhenTokenIsAllControlChars: edge case
- fixedInterceptor_passesCleanTokenUnmodified: regression test
Run with: cd test-runner && ./gradlew test
Co-authored-by: Claude <claude@anthropic.com>1 parent c76940e commit c33eb1b
8 files changed
Lines changed: 693 additions & 0 deletions
File tree
- test-runner
- gradle/wrapper
- src/test/kotlin/com/mattermost/networkclient
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments