authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-05 00:25:45-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-05 00:25:45-07:00
logac93fbfad01ecd99f818d9964463afb6c35a8f4a
tree74253ab55b10273978c9559de0a0f6e8463b9394
parentba873b8181c3741603a365e75785457064a52ffd
signature Signed by PGP key B5690EEEBB952194

test(relay): keep the stage slug helper private (#9998)


2 files changed, 1 insertions(+), 8 deletions(-)

infra/relay/src/deploymentConfig.test.ts-7
......@@ -11,17 +11,10 @@ import {
1111 RelayPublicDomainLabelTooLongError,
1212 relayPublicDomainForStage,
1313 relayResourceNameForStage,
14 relayStageSlug,
1514} from "./deploymentConfig.ts";
1615
1716const isRelayPublicDomainLabelTooLongError = Schema.is(RelayPublicDomainLabelTooLongError);
1817
19describe("relayStageSlug", () => {
20 it("matches Alchemy physical-name sanitization for default developer stages", () => {
21 expect(relayStageSlug("dev_julius")).toBe("dev-julius");
22 });
23});
24
2518describe("relayPublicDomainForStage", () => {
2619 it("uses the canonical relay hostname for production", () => {
2720 expect(relayPublicDomainForStage("prod", ".example.com.")).toBe("relay.example.com");
infra/relay/src/deploymentConfig.ts+1-1
......@@ -56,7 +56,7 @@ function appendDnsSafeSuffix(prefix: string, suffix: string): string {
5656 * Alchemy's physical-name helper sanitizes resource names after adding the
5757 * stage. Keep custom domains and runtime-created resources aligned with it.
5858 */
59export function relayStageSlug(stage: string): string {
59function relayStageSlug(stage: string): string {
6060 return stage
6161 .toLowerCase()
6262 .replaceAll(/[^a-z0-9-]/g, "-")