Skip to content

Commit ac844a0

Browse files
test(run-account-lifecycle-cron): update private origin handling
Added a new URL for a Railway-private HTTP origin with credentials. This change ensures that the test uses the correct private origin when configured, enhancing the accuracy of the test cases.
1 parent 7b2b3f6 commit ac844a0

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

scripts/run-account-lifecycle-cron.test.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ import test from "node:test";
44
import { lifecycleEndpoint } from "./run-account-lifecycle-cron.mjs";
55

66
const CRON_SECRET = "a".repeat(32);
7+
const privateOriginWithCredentials = new URL(
8+
"http://study-buddy-v2.railway.internal:8080"
9+
);
10+
privateOriginWithCredentials.username = "test-user";
11+
privateOriginWithCredentials.password = "test-password";
712

813
test("uses a Railway-private HTTP origin when configured", () => {
914
const result = lifecycleEndpoint({
@@ -36,7 +41,7 @@ for (const origin of [
3641
"https://study-buddy-v2.railway.internal:8080",
3742
"http://railway.internal:8080",
3843
"http://study-buddy-v2.railway.internal.example.com:8080",
39-
"http://user:password@study-buddy-v2.railway.internal:8080",
44+
privateOriginWithCredentials.toString(),
4045
"http://study-buddy-v2.railway.internal:8080/unexpected-path",
4146
"http://study-buddy-v2.railway.internal:8080/?unexpected=query",
4247
]) {

0 commit comments

Comments
 (0)