sqlmock.New() returns (Sqlmock, error) where Sqlmock is the interface type, not a pointer. setupTestDB correctly returns sqlmock.Sqlmock (interface), but setupWorkspaceCrudTest and setupInstructionsTestDB incorrectly declared *sqlmock.Sqlmock (pointer to interface). In Go, *Interface is a distinct type from Interface — this would be a compile error. Root cause: copy-paste from setupWorkspaceCrudTest where the original author assumed *sqlmock.Sqlmock was the correct type. Fix: change both setup functions to return sqlmock.Sqlmock (interface) to match what sqlmock.New() actually returns. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| cmd | ||
| internal | ||
| migrations | ||
| pkg/provisionhook | ||
| .air.toml | ||
| .ci-force | ||
| .gitignore | ||
| .golangci.yaml | ||
| Dockerfile | ||
| Dockerfile.dev | ||
| Dockerfile.tenant | ||
| entrypoint-tenant.sh | ||
| go.mod | ||
| go.sum | ||