Add e2e tests for me.* procedures and fix code review issues
- Add comprehensive e2e tests for me.get, me.authStatus, me.setupProfile, me.updateProfile, me.setPassword, and me.delete (21 tests) - Make createDb require explicit connection string (no default env lookup) - Add database name validation to prevent SQL injection in CREATE DATABASE - Fix getTestDatabaseUrl to throw instead of returning empty string - Replace brittle relative path with findRepoRoot() function - Extract magic numbers (SESSION_EXPIRY_MS, API_TOKEN_EXPIRY_MS, ONE_DAY_MS) - Consolidate duplicate createAPIContext functions - Add hasPassword field to meAuthStatus and toUserResponse Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,13 @@ async function bootstrap(
|
||||
console.log("RevIQ Bootstrap - Create Superuser");
|
||||
console.log("===================================\n");
|
||||
|
||||
const db = createDb();
|
||||
const databaseUrl = Bun.env.DATABASE_URL;
|
||||
if (!databaseUrl) {
|
||||
console.error("Error: DATABASE_URL environment variable is required");
|
||||
this.process.exit(1);
|
||||
}
|
||||
|
||||
const db = createDb(databaseUrl);
|
||||
|
||||
try {
|
||||
// Execute the bootstrap operation
|
||||
|
||||
Reference in New Issue
Block a user