fix: resolve diagnostic paths under the base path prefix and tolerate health-style ping responses
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
type DiagnosticAdapters,
|
||||
} from "../src/workspaces/diagnostics.js";
|
||||
import type { RuntimeBindings } from "../src/workspaces/runtime-renderer.js";
|
||||
import { parseWorkspaceYaml } from "../src/workspaces/schema.js";
|
||||
import { parseWorkspaceYaml, resolveDiagnosticUrl } from "../src/workspaces/schema.js";
|
||||
|
||||
const workspace = parseWorkspaceYaml(`workspace:
|
||||
schema_version: 3
|
||||
@@ -486,3 +486,10 @@ test("classifies an observed non-cosine Qdrant distance as semantic incompatibil
|
||||
code: "connector_unavailable",
|
||||
}));
|
||||
});
|
||||
|
||||
test("resolveDiagnosticUrl appends the path to a base URL with a path prefix", () => {
|
||||
expect(resolveDiagnosticUrl("https://dwh.example.test/dwh/", "/rpc/ping").toString())
|
||||
.toBe("https://dwh.example.test/dwh/rpc/ping");
|
||||
expect(resolveDiagnosticUrl("https://dwh.example.test/dwh", "/rpc/ping").toString())
|
||||
.toBe("https://dwh.example.test/dwh/rpc/ping");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user