fix: skip icon-repair integration test when no DB is configured
CI / check (push) Successful in 24s
CI / release (push) Skipped
CI / deploy (push) Successful in 1m2s

This commit is contained in:
openhands committed 2026-08-03 17:47:07 +02:00
1 parent 613b7502e1
commit bee55e1fd4
1 file changed
+22
+22
View File
@@ -0,0 +1,22 @@
import { describe, it } from "vitest";
// Integration test against the live database. Vitest runs without a populated
// .env (SKIP_ENV_VALIDATION=1), so only execute when a DATABASE_URL is provided.
const hasDb =
typeof process.env.DATABASE_URL === "string" &&
process.env.DATABASE_URL.length > 0;
describe.skipIf(!hasDb)("repair icons", () => {
it("runs icon repair", async () => {
const { repairMissingIcons } = await import("@/lib/services/repair-icons");
const result = await repairMissingIcons((evt) => {
if (evt.type === "batch_complete") {
console.log("BATCH COMPLETE:", JSON.stringify(evt));
} else if (evt.type === "error") {
console.log("ERROR:", evt.message);
}
});
console.log("Result:", JSON.stringify(result));
}, 600_000);
});