fix(test): rename test table from _sdk_test to sdk_test#62
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
WalkthroughUpdated integration tests and CI workflows: renamed test Postgres table, changed test auth setup to use env-provided credentials, loosened a storage test assertion, and added two integration test environment variables to CI workflows. All changes are confined to tests and workflow files. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
- setup.ts: signUpAndSignIn() now uses fixed test credentials (env vars) instead of creating new users that can't authenticate with email verification enabled - setup.ts: signUpFreshUser() kept for auth registration tests only - storage.test.ts: list() tests handle admin-only permission gracefully - database.test.ts: rename test table to sdk_test - ci.yml/integration.yml: add test account env vars Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
integration-tests/setup.ts (1)
1-9:⚠️ Potential issue | 🟡 MinorStale documentation: update the comment to reflect new requirements.
Line 8 states "The suite creates its own users so no pre-existing credentials are needed," but
signUpAndSignIn()now requires pre-verified test account credentials viaINSFORGE_INTEGRATION_TEST_EMAILandINSFORGE_INTEGRATION_TEST_PASSWORD.📝 Suggested documentation update
/** * Shared setup for integration tests. * * Environment variables: * INSFORGE_INTEGRATION_BASE_URL – required, e.g. https://xxx.us-east.insforge.app * INSFORGE_INTEGRATION_ANON_KEY – required, project anon key + * INSFORGE_INTEGRATION_TEST_EMAIL – required, pre-verified test account email + * INSFORGE_INTEGRATION_TEST_PASSWORD – required, pre-verified test account password * - * The suite creates its own users so no pre-existing credentials are needed. + * Most tests use a fixed pre-verified account (signUpAndSignIn). Auth registration + * tests use signUpFreshUser to create new unverified accounts. */🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@integration-tests/setup.ts` around lines 1 - 9, The file's top comment is stale: update the docblock to reflect that signUpAndSignIn() now requires pre-verified test account credentials; remove or change the line "The suite creates its own users so no pre-existing credentials are needed" and add a note that tests require INSFORGE_INTEGRATION_TEST_EMAIL and INSFORGE_INTEGRATION_TEST_PASSWORD environment variables (pre-verified test account) in addition to INSFORGE_INTEGRATION_BASE_URL and INSFORGE_INTEGRATION_ANON_KEY so callers know to provide those before running the integration test suite.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@integration-tests/setup.ts`:
- Around line 1-9: The file's top comment is stale: update the docblock to
reflect that signUpAndSignIn() now requires pre-verified test account
credentials; remove or change the line "The suite creates its own users so no
pre-existing credentials are needed" and add a note that tests require
INSFORGE_INTEGRATION_TEST_EMAIL and INSFORGE_INTEGRATION_TEST_PASSWORD
environment variables (pre-verified test account) in addition to
INSFORGE_INTEGRATION_BASE_URL and INSFORGE_INTEGRATION_ANON_KEY so callers know
to provide those before running the integration test suite.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: cbd592ac-13ac-47c8-9a09-bf092c85fe99
📒 Files selected for processing (4)
.github/workflows/ci.yml.github/workflows/integration.ymlintegration-tests/setup.tsintegration-tests/storage.test.ts
Note
Rename integration test table constant from
_sdk_testtosdk_testUpdates the
TABLEconstant and prerequisite documentation in database.test.ts to usesdk_testinstead of_sdk_test. All integration test queries now target thesdk_testtable.Changes since #62 opened
list()test assertions to handle permission and availability constraints [896999d]Macroscope summarized 5172ea0.
Summary by CodeRabbit
Tests
Chores