| author | |
| committer | |
| log | ac93fbfad01ecd99f818d9964463afb6c35a8f4a |
| tree | 74253ab55b10273978c9559de0a0f6e8463b9394 |
| parent | ba873b8181c3741603a365e75785457064a52ffd |
| signature | Signed by PGP key B5690EEEBB952194 |
2 files changed, 1 insertions(+), 8 deletions(-)
infra/relay/src/deploymentConfig.test.ts-7| ... | ... | @@ -11,17 +11,10 @@ import { |
| 11 | 11 | RelayPublicDomainLabelTooLongError, |
| 12 | 12 | relayPublicDomainForStage, |
| 13 | 13 | relayResourceNameForStage, |
| 14 | relayStageSlug, | |
| 15 | 14 | } from "./deploymentConfig.ts"; |
| 16 | 15 | |
| 17 | 16 | const isRelayPublicDomainLabelTooLongError = Schema.is(RelayPublicDomainLabelTooLongError); |
| 18 | 17 | |
| 19 | describe("relayStageSlug", () => { | |
| 20 | it("matches Alchemy physical-name sanitization for default developer stages", () => { | |
| 21 | expect(relayStageSlug("dev_julius")).toBe("dev-julius"); | |
| 22 | }); | |
| 23 | }); | |
| 24 | ||
| 25 | 18 | describe("relayPublicDomainForStage", () => { |
| 26 | 19 | it("uses the canonical relay hostname for production", () => { |
| 27 | 20 | 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 { |
| 56 | 56 | * Alchemy's physical-name helper sanitizes resource names after adding the |
| 57 | 57 | * stage. Keep custom domains and runtime-created resources aligned with it. |
| 58 | 58 | */ |
| 59 | export function relayStageSlug(stage: string): string { | |
| 59 | function relayStageSlug(stage: string): string { | |
| 60 | 60 | return stage |
| 61 | 61 | .toLowerCase() |
| 62 | 62 | .replaceAll(/[^a-z0-9-]/g, "-") |