Skip to content

fix: remove SQL tests from migration file#1348

Merged
riderx merged 1 commit into
mainfrom
riderx/remove-sql-tests
Jan 2, 2026
Merged

fix: remove SQL tests from migration file#1348
riderx merged 1 commit into
mainfrom
riderx/remove-sql-tests

Conversation

@riderx
Copy link
Copy Markdown
Member

@riderx riderx commented Jan 2, 2026

Summary

Removed inline SQL tests from the hashed API keys migration. Tests should never run in production migrations—they're already covered by comprehensive integration tests in tests/apikeys.test.ts.

Test plan

  • Run bun test:backend tests/apikeys.test.ts to verify hashed API key functionality is tested
  • Existing migration tests ensure schema changes work correctly

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Removed verification test cases and validation code from the API key hashing database migration.

✏️ Tip: You can customize this high-level summary in your review settings.

Tests should never run in production migrations. The hashed API key functionality is already covered by comprehensive tests in tests/apikeys.test.ts. Removed the DO block that was creating and deleting test data during migration.

🤖 Generated with Claude Code

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 2, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The migration file supabase/migrations/20251228080032_hashed_api_keys.sql has been modified to remove Section 8, which contained inline SQL tests for hashed API key functions. The removal eliminates test DO blocks, test data setup, assertions, and cleanup operations without introducing new functional code.

Changes

Cohort / File(s) Summary
Migration Test Removal
supabase/migrations/20251228080032_hashed_api_keys.sql
Removed inline SQL tests (Section 8) including DO blocks for verify_api_key_hash, find_apikey_by_value, and check_org_hashed_key_enforcement, along with associated test data setup and assertions

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A tidy migration, cleaner now,
Test blocks removed with a rabbit's bow,
The hashed keys still guard our way,
Just fewer tests to check today!


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0545a5e and a7b77bc.

📒 Files selected for processing (1)
  • supabase/migrations/20251228080032_hashed_api_keys.sql

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 and usage tips.

@riderx riderx merged commit 21eee11 into main Jan 2, 2026
7 of 8 checks passed
@riderx riderx deleted the riderx/remove-sql-tests branch January 2, 2026 13:18
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jan 2, 2026

Dalanir pushed a commit that referenced this pull request Jan 12, 2026
Tests should never run in production migrations. The hashed API key functionality is already covered by comprehensive tests in tests/apikeys.test.ts. Removed the DO block that was creating and deleting test data during migration.

🤖 Generated with Claude Code

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
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