Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
@@ -60,8 +60,8 @@ describe("getHostRoutingRuntimeDecision", () => {
|
||||
new Request("http://app.localhost/internal/api/workflows/run/workflow_1?tenantId=tenant_1", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"x-toolctrl-internal-web-api-proxy": "1",
|
||||
"x-toolctrl-internal-web-api-proxy-signature": "signed",
|
||||
"x-hivegrid-internal-web-api-proxy": "1",
|
||||
"x-hivegrid-internal-web-api-proxy-signature": "signed",
|
||||
"x-api-key": "tenant-api-key",
|
||||
},
|
||||
body: JSON.stringify({ name: "Ada" }),
|
||||
@@ -71,8 +71,8 @@ describe("getHostRoutingRuntimeDecision", () => {
|
||||
expect(decision.target).toBe("web");
|
||||
expect(new URL(decision.request.url).pathname).toBe("/internal/api/workflows/run/workflow_1");
|
||||
expect(new URL(decision.request.url).search).toBe("?tenantId=tenant_1");
|
||||
expect(decision.request.headers.get("x-toolctrl-internal-web-api-proxy")).toBe("1");
|
||||
expect(decision.request.headers.get("x-toolctrl-internal-web-api-proxy-signature")).toBe("signed");
|
||||
expect(decision.request.headers.get("x-hivegrid-internal-web-api-proxy")).toBe("1");
|
||||
expect(decision.request.headers.get("x-hivegrid-internal-web-api-proxy-signature")).toBe("signed");
|
||||
expect(decision.request.headers.get("x-api-key")).toBe("tenant-api-key");
|
||||
});
|
||||
|
||||
@@ -96,6 +96,14 @@ describe("getHostRoutingRuntimeDecision", () => {
|
||||
expect(new URL(metricsDataDecision.request.url).pathname).toBe("/metrics/summary.data");
|
||||
});
|
||||
|
||||
test("redirects the legacy admin login URL on the canonical admin host", () => {
|
||||
expect(getHostRoutingRuntimeDecision(new Request("http://admin.localhost/admin/login?error=sso_state_invalid#retry"))).toEqual({
|
||||
type: "redirect",
|
||||
status: 308,
|
||||
location: "http://admin.localhost/login?error=sso_state_invalid#retry",
|
||||
});
|
||||
});
|
||||
|
||||
test.each([
|
||||
["/api?tab=overview", "/api"],
|
||||
["/api/keys?filter=active#keys", "/api/keys"],
|
||||
@@ -159,6 +167,10 @@ describe("getHostRoutingRuntimeDecision", () => {
|
||||
type: "reject",
|
||||
status: 404,
|
||||
});
|
||||
expect(getHostRoutingRuntimeDecision(new Request("http://app.localhost/admin/login?error=sso_state_invalid"))).toEqual({
|
||||
type: "reject",
|
||||
status: 404,
|
||||
});
|
||||
});
|
||||
|
||||
test("redirects canonical paths away from the wrong host before dispatch", () => {
|
||||
|
||||
Reference in new issue
Block a user