fix(tests): repair tests/integration compile errors (upstream API/import drift) #755

Merged
jmiller merged 1 commits from fix/integration-tests-compile-wt into dev 2026-07-06 03:14:25 +00:00
Owner

The tests/integration package failed to compile (not just fail at runtime) due to drift that was never propagated after upstream API changes + the fork module rename. This blocked the layered test pipeline (Template-Go#4) and is the clean go-compile owed before the #733 production release.

Fixes (2 files, the whole error surface)

  1. api_packages_composer_test.gocomposer.PackageMetadataResponse{} (a value) used where *composer.PackageMetadataResponse (pointer) is required → take the address.
  2. oauth_avatar_test.go — 10 stale upstream imports code.gitea.io/gitea/... (never updated after the fork renamed its module) → code.mokoconsulting.tech/MokoConsulting/MokoGitea/.... This was causing the oauth2.Source value-type mismatch against addOAuth2Source (two different modules' Source types).

Verification

go vet ./tests/integration/...exits 0 (package compiles clean). Both files gofmt-clean. Only test files changed — no production code touched.

Note: the broader error chain feared in Template-Go#4 (oauth2 dup func, NewRequestWithBody []byteio.Reader) did not materialize — those were already resolved in the current tree; these two were the only remaining compile blockers.

Unblocks Template-Go#4 and provides the clean integration-test compile for #733.

https://claude.ai/code/session_01Wsno14cxE49MstXFs9G5KT

The `tests/integration` package failed to **compile** (not just fail at runtime) due to drift that was never propagated after upstream API changes + the fork module rename. This blocked the layered test pipeline (Template-Go#4) and is the clean go-compile owed before the #733 production release. ## Fixes (2 files, the whole error surface) 1. **`api_packages_composer_test.go`** — `composer.PackageMetadataResponse{}` (a value) used where `*composer.PackageMetadataResponse` (pointer) is required → take the address. 2. **`oauth_avatar_test.go`** — 10 stale **upstream** imports `code.gitea.io/gitea/...` (never updated after the fork renamed its module) → `code.mokoconsulting.tech/MokoConsulting/MokoGitea/...`. This was causing the `oauth2.Source` value-type mismatch against `addOAuth2Source` (two different modules' `Source` types). ## Verification `go vet ./tests/integration/...` → **exits 0** (package compiles clean). Both files gofmt-clean. Only test files changed — no production code touched. Note: the broader error chain feared in Template-Go#4 (oauth2 dup func, `NewRequestWithBody` `[]byte`→`io.Reader`) did **not** materialize — those were already resolved in the current tree; these two were the only remaining compile blockers. Unblocks **Template-Go#4** and provides the clean integration-test compile for **#733**. https://claude.ai/code/session_01Wsno14cxE49MstXFs9G5KT
jmiller added 1 commit 2026-07-06 03:12:19 +00:00
fix(tests): repair tests/integration compile errors from upstream API/import drift
Universal: PR Check / Require Docs Update (pull_request) Has been skipped
Universal: PR Check / Wiki Update Reminder (pull_request) Has been skipped
PR RC Release / Build RC Release (pull_request) Successful in 3s
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Universal: PR Check / Validate PR (pull_request) Successful in 9s
Generic: Project CI / Lint & Validate (pull_request) Successful in 40s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 1m27s
Universal: PR Check / Secret Scan (pull_request) Successful in 1m22s
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Generic: Project CI / Tests (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
7203628004
Two compile errors blocked the whole tests/integration package (prereq for the
layered test pipeline, Template-Go#4, and the clean go-compile owed by #733):

- api_packages_composer_test.go: composer.PackageMetadataResponse{} (value) used
  where *PackageMetadataResponse (pointer) is required -> take the address.
- oauth_avatar_test.go: 10 stale upstream 'code.gitea.io/gitea/' imports (never
  updated after the fork module rename) -> 'code.mokoconsulting.tech/MokoConsulting/MokoGitea/'.

go vet ./tests/integration/... now exits 0 (compiles clean).

Claude-Session: https://claude.ai/code/session_01Wsno14cxE49MstXFs9G5KT
jmiller merged commit 8d8ecf176a into dev 2026-07-06 03:14:25 +00:00
jmiller deleted branch fix/integration-tests-compile-wt 2026-07-06 03:14:25 +00:00
Sign in to join this conversation.