Skip to content

refactor: centralize test utilities and standardize test patterns#99

Merged
neekolas merged 1 commit into
mainfrom
04-03-test_infra_cleanup
Apr 8, 2026
Merged

refactor: centralize test utilities and standardize test patterns#99
neekolas merged 1 commit into
mainfrom
04-03-test_infra_cleanup

Conversation

@neekolas
Copy link
Copy Markdown
Collaborator

@neekolas neekolas commented Apr 5, 2026

  • Move test/helpers.go to pkg/testutils/db.go
  • Add pkg/testutils/logger.go with TestLogger(t) using zaptest
  • Replace logging.CreateLogger("console", "info") with testutils.TestLogger(t)
  • Replace context.Background() with t.Context() in all test files
  • Standardize t.Cleanup in api_test.go (remove defer ctx.cleanup pattern)
  • Standardize require over assert in http_test.go

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

Note

Centralize test utilities and standardize test patterns across packages

Macroscope summarized bf652cf.

@neekolas neekolas marked this pull request as ready for review April 5, 2026 17:57
@neekolas neekolas requested a review from a team as a code owner April 5, 2026 17:57
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Apr 5, 2026
@macroscopeapp
Copy link
Copy Markdown

macroscopeapp Bot commented Apr 5, 2026

Approvability

A prior Macroscope approval was dismissed. Re-evaluating bf652cf

No code changes detected at 0de1f5f. Prior analysis still applies.

Copy link
Copy Markdown
Collaborator Author

neekolas commented Apr 8, 2026

Merge activity

  • Apr 8, 1:04 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 8, 2:16 AM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 8, 2:18 AM UTC: Graphite couldn't merge this PR because it was not satisfying all requirements (PR does not have required approvals).
  • Apr 8, 5:03 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 8, 5:04 PM UTC: @neekolas merged this pull request with Graphite.

@neekolas neekolas changed the base branch from 04-03-upgrade-go-1.26 to graphite-base/99 April 8, 2026 02:15
@neekolas neekolas changed the base branch from graphite-base/99 to main April 8, 2026 02:15
@macroscopeapp macroscopeapp Bot dismissed their stale review April 8, 2026 02:15

Dismissing prior approval to re-evaluate bf652cf

- Move test/helpers.go to pkg/testutils/db.go
- Add pkg/testutils/logger.go with TestLogger(t) using zaptest
- Replace logging.CreateLogger("console", "info") with testutils.TestLogger(t)
- Replace context.Background() with t.Context() in all test files
- Standardize t.Cleanup in api_test.go (remove defer ctx.cleanup pattern)
- Standardize require over assert in http_test.go

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@neekolas neekolas force-pushed the 04-03-test_infra_cleanup branch from bf652cf to 0de1f5f Compare April 8, 2026 02:16
@neekolas neekolas merged commit e89b8a9 into main Apr 8, 2026
8 checks passed
@neekolas neekolas deleted the 04-03-test_infra_cleanup branch April 8, 2026 17:04
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.

2 participants