t3-code-android-nightly/.repos/alchemy-effect/packages/alchemy/test/GCP/KMS/common.ts
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00

15 lines
539 B
TypeScript

import * as Core from "@/Test/Core";
/**
* Cloud KMS never deletes key rings, and keeps destroyed keys for at least
* a day. Tests therefore reuse fixed ids, which the CryptoKey provider
* reclaims after destroy. Scope them by test stage so developers (and CI)
* sharing one project never contend for the same key.
*/
export const kmsTestId = (name: string) =>
`alchemy-test-${name}-${Core.defaultStage()}`
.toLowerCase()
.replace(/[^a-z0-9_-]/g, "-")
.slice(0, 63);
export const KEY_RING_ID = "alchemy-test-keyring";