Spaces:
Running
Running
| import { dbRepo } from "../src/infrastructure/db/repository.ts"; | |
| async function setup() { | |
| console.log("Setting up test tenant..."); | |
| try { | |
| await dbRepo.createTenant({ | |
| id: "tenant_test", | |
| apiKey: process.env.API_KEYS?.split(",")[0] || "", | |
| name: "Test Admin", | |
| dailyQuotaUsd: "10.0", | |
| alertThresholdRatio: "0.8", | |
| role: "admin", | |
| accountStatus: "active", | |
| }); | |
| console.log("Tenant created successfully."); | |
| } catch (e: any) { | |
| console.log("Tenant already exists or error:", e.message); | |
| } | |
| process.exit(0); | |
| } | |
| setup(); | |