Skip to content

test(store): org delete keeps service user rows for the deleter to remove - #1988

Merged
rohilsurana merged 1 commit into
mainfrom
fix/serviceuser-org-delete-test
Oct 13, 2026
Merged

rohilsurana merged 1 commit into
mainfrom
fix/serviceuser-org-delete-test

Conversation

@rohilsurana

Copy link
Copy Markdown
Member

What changes

  • Replaces TestOrgDeleteCountsLiveServiceUsersOnly with TestOrgDeleteKeepsServiceUserRows.

Why

The old test comes from #1977. It expected a hard org delete to fail with a foreign key error while a live service user existed. Since #1973 an org delete only sets deleted_at, so that error no longer happens. The test fails on main (the Test workflow at caef5beb).

The new test checks what happens now. The org row gets deleted_at, and the service user row stays untouched. Removing service users first is the job of the deleter, not the database.

Tests

  • go test ./internal/store/postgres/ passes.
  • Lint: 0 issues.

@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
frontier Ready Ready Preview Oct 13, 2026 7:26am UTC

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 37 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: raystack/frontier/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 32875266-2b6a-46cc-9580-d02105b50766
📥 Commits

Reviewing files that changed from the base of the PR and between b3d3e2b and 207868e.

📒 Files selected for processing (1)
  • internal/store/postgres/serviceuser_repository_test.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rohilsurana
rohilsurana marked this pull request as ready for review October 13, 2026 07:30
@rohilsurana
rohilsurana merged commit e332b47 into main Oct 13, 2026
7 of 8 checks passed
@rohilsurana
rohilsurana deleted the fix/serviceuser-org-delete-test branch October 13, 2026 07:30
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 38362546678

Warning

No base build found for commit b3d3e2b on main.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 54.756%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 41517
Covered Lines: 22733
Line Coverage: 54.76%
Coverage Strength: 18.7 hits per line

💛 - Coveralls

This branch was successfully deployed

1 active deployment
Preview — 207868eb Deployed Oct 13, 2026 by vercel[bot]
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