Repository navigation
fix(test): convert the pg suites missed by the shared container change - #1958
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
rohilsurana
marked this pull request as ready for review
September 29, 2026 06:54
AmanGIT07
approved these changes
Sep 29, 2026
Coverage Report for CI Build 36533234902Warning No base build found for commit Coverage: 52.7%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
maindoes not compile. Theinternal/store/postgrestest package fails to build, so theunitandgolangcijobs fail on every PR opened against it.#1934 moved the package to one shared postgres container.
newTestClientnow takes no arguments and returns two values, andpurgeDockeris gone becauseTestMaintears the container down centrally. That change converted 28 test files. Seven were missed.The seven were not overlooked. They landed on
mainfrom a parallel series while #1934 sat in review, so they did not exist in that branch. Git merged both sides without a conflict because no two commits touched the same lines. Nothing compiled the result until after the merge.Changes
project_users_repository_pg_test.go(from feat(store): project users search skips soft-deleted rows #1946)user_orgs_repository_pg_test.go(from feat(store): user organizations search skips soft-deleted rows #1947)user_projects_repository_pg_test.go(from feat(store): user projects search skips soft-deleted rows #1945)org_serviceuser_credentials_repository_pg_test.go(from feat(store): org service user credentials search skips soft-deleted rows #1949)org_invoices_repository_pg_test.go(from feat(store): org invoices search skips soft-deleted rows #1951)search_invalid_uuid_pg_test.go(from fix(store): a search value that is not a uuid reports bad input #1952)search_live_org_pg_test.go(from feat(store): org scoped searches report nothing for a deleted organization #1953)Each one drops its
poolandresourcefields, callsnewTestClient(), and closes its client withcloseTestClientinstead of purging the container. Thedockertest,ioandlog/slogimports go with them. No test logic changes.Technical Details
The edit is the same in all seven files, so it is quicker to read one and skim the rest.
There is no behaviour change. Each suite still gets its own database, because
newTestClientcreates a fresh one from the migrated template per call. It just no longer starts and stops its own container.Worth knowing for next time: a rebase is not enough to catch this. The merge is clean at the text level and only the compiler sees the problem. A required check that builds the merge result would have caught it before the merge rather than after.
Test Plan
go vet ./internal/store/postgres/...passes. It fails onmaintoday.go test ./internal/store/postgres/passes end to end against a real postgres, 41s for the whole package.golangci-lint run ./internal/store/postgres/...reports 0 issues. It reports a typecheck failure onmaintoday.SQL Safety (if your PR touches
*_repository.goorgoqu.*)Not applicable. This PR only touches
_test.gofiles and changes no queries.