Skip to content

Use UTF-8 string literals instead of Encoding.GetBytes in tests#164

Merged
dennisdoomen merged 2 commits into
mainfrom
fix-utf8-string-literals-in-tests
Jul 14, 2026
Merged

Use UTF-8 string literals instead of Encoding.GetBytes in tests#164
dennisdoomen merged 2 commits into
mainfrom
fix-utf8-string-literals-in-tests

Conversation

@dennisdoomen

@dennisdoomen dennisdoomen commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Changes

1. GitHub Advanced Security follow-up

InspectCode flagged two Encoding.UTF8.GetBytes(...) calls in the new tests added by #163, suggesting UTF-8 string literals instead. Replaced with "..."u8.ToArray() in Cannot_match_body_with_an_unrecognized_content_type_by_default and Can_force_a_body_with_an_unrecognized_content_type_to_be_treated_as_textual, consistent with existing usage elsewhere in HttpMockSpecs.cs.

Note: #163 was merged before these code-scanning comments were addressed, so this is a small follow-up PR against main.

2. Release notes template

Added skip-release-notes to .github/release.yml's changelog.exclude.labels, so PRs labeled skip-release-notes are excluded from auto-generated release notes (same mechanism already used for changelog-ignore).

Testing

  • dotnet test --filter "FullyQualifiedName~AdvancedMatching" passes on both net8.0 and net472.
  • .github/release.yml is a config-only change (no build/test applicable).

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Addresses GitHub Advanced Security / InspectCode findings on PR #163.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@dennisdoomen
dennisdoomen enabled auto-merge (rebase) July 14, 2026 13:28
@coveralls

coveralls commented Jul 14, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 29336620055

Coverage remained the same at 84.925%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1515
Covered Lines: 1355
Line Coverage: 89.44%
Relevant Branches: 495
Covered Branches: 352
Branch Coverage: 71.11%
Branches in Coverage %: Yes
Coverage Strength: 331.93 hits per line

💛 - Coveralls

@github-actions

Copy link
Copy Markdown

Test Results

  3 files  ±0    3 suites  ±0   8s ⏱️ -1s
199 tests ±0  199 ✅ ±0  0 💤 ±0  0 ❌ ±0 
395 runs  ±0  395 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit b935eef. ± Comparison against base commit 89ac9d9.

@dennisdoomen
dennisdoomen merged commit 66e627d into main Jul 14, 2026
10 checks passed
@dennisdoomen
dennisdoomen deleted the fix-utf8-string-literals-in-tests branch July 14, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants