Skip to content

reorganize test to code avoid importing testing - #1681

Open
MichaelMure wants to merge 1 commit into
trunkfrom
clean-testing
Open

MichaelMure wants to merge 1 commit into
trunkfrom
clean-testing

Conversation

@MichaelMure

@MichaelMure MichaelMure commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

also modernize a bit

RetriggerConfidence Score: 5/5 Tier: apex

The PR appears safe to merge; no actionable issue remains.

Summary

Moves shared test helpers into repotest, dagtest, and envtest, keeping testing out of their parent packages.

  • Repository tests use shared helpers outside the repository package.
  • DAG operation tests save and reread operations through shared helpers.
  • Command tests get their environment fixtures from a test-only package.
  • Wrapped errors keep their context using Go's standard library.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  RT["Repository and API tests"] --> RP["repotest"]
  RP --> R["repository"]
  CT["Command tests"] --> ET["envtest"]
  ET --> E["execenv"]
  ET --> RP
  BT["Bug operation tests"] --> DT["dagtest"]
  DT --> D["entity/dag"]
  DT --> R
Loading

Reviews (6) · Last reviewed commit: "reorganize test to code avoid importing ..." · Reviewed by Greptile

@MichaelMure
MichaelMure added this pull request to stack #1682 October 10, 2026 20:29
Base automatically changed from gitconfig to trunk October 10, 2026 21:41
@MichaelMure
MichaelMure force-pushed the clean-testing branch 2 times, most recently from f70c656 to e800589 Compare October 12, 2026 10:44
Comment thread entity/dag/op_noop_test.go Outdated
Comment thread entity/dag/dagtest/dagtest.go
@MichaelMure
MichaelMure force-pushed the clean-testing branch 2 times, most recently from 73c34ac to 7643100 Compare October 13, 2026 07:45

This branch has not been deployed

No deployments
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