Skip to content

test(#791): migrate pkg/copier tests to require.*#802

Merged
morgo merged 3 commits into
block:mainfrom
morgo:fix-issue-791-pkg-copier-assert-require
May 2, 2026
Merged

test(#791): migrate pkg/copier tests to require.*#802
morgo merged 3 commits into
block:mainfrom
morgo:fix-issue-791-pkg-copier-assert-require

Conversation

@morgo
Copy link
Copy Markdown
Collaborator

@morgo morgo commented May 2, 2026

Closes #791. Part of #779.

Summary

  • Migrate assert.* -> require.* in pkg/copier/*_test.go where appropriate.
  • Loop and table-driven assertions kept as assert.* where seeing all failures at once is preferable.
  • No production code changes.

Test plan

  • CI passes

🤖 Generated with Claude Code

Part of block#779. Setup-path errors now fail-fast instead of cascading
into confusing follow-on assertion failures.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@morgo morgo marked this pull request as ready for review May 2, 2026 03:01
…riven loops keep assert

Per block#779 follow-up: assert.* is now allowed ONLY inside goroutine bodies
(where require.FailNow is unsafe) and inside table-driven test loops
(where seeing all case failures together helps). Everything else uses
require.*.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@morgo morgo merged commit a73001d into block:main May 2, 2026
12 checks passed
@morgo morgo deleted the fix-issue-791-pkg-copier-assert-require branch May 2, 2026 13:33
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.

pkg/copier

2 participants