test(server): preserve UUID entropy in restore company prefixes

The 60-company retained-history fixture collided on Rad9867 under companies_issue_prefix_idx in CI job 124331069055. Use the complete generated company UUID for its unique prefix while preserving all retention assertions.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-30 17:07:07 -05:00
1 parent b1104c6dd7
commit 7b0da01e3a
1 file changed
+1 -1
@@ -73,7 +73,7 @@ describeEmbeddedPostgres("git restore point retention", () => {
} = {}) {
const companyId = input.companyId ?? randomUUID();
if (!input.companyId) {
await db.insert(companies).values({ id: companyId, name: "Restore", issuePrefix: `R${companyId.slice(0, 6)}` });
await db.insert(companies).values({ id: companyId, name: "Restore", issuePrefix: `R${companyId.replaceAll("-", "")}` });
}
const issueStatus = input.issueStatus ?? "done";
const closedAt = new Date(now.getTime() - (input.closedDaysAgo ?? 10) * DAY_MS);