feat: render private semantic service endpoints
This commit is contained in:
@@ -37,10 +37,29 @@ test("loadConfig keeps local development defaults", () => {
|
||||
maxImportBytes: 10 * 1024 * 1024,
|
||||
maxImportEntries: 32,
|
||||
},
|
||||
internalQdrantUrl: "http://qdrant:6333",
|
||||
internalEmbeddingUrl: "http://embedding:11434",
|
||||
internalEmbeddingModel: "qwen3-embedding:0.6b",
|
||||
internalEmbeddingDimensions: 1024,
|
||||
});
|
||||
expect(loadConfig({}).dataRoot).toBeUndefined();
|
||||
});
|
||||
|
||||
test("loadConfig accepts only the allowed internal semantic runtime hosts", () => {
|
||||
expect(loadConfig({
|
||||
THT_INTERNAL_QDRANT_URL: "http://localhost:6333",
|
||||
THT_INTERNAL_EMBEDDING_URL: "http://127.0.0.1:11434",
|
||||
})).toMatchObject({
|
||||
internalQdrantUrl: "http://localhost:6333",
|
||||
internalEmbeddingUrl: "http://127.0.0.1:11434",
|
||||
});
|
||||
|
||||
expect(() => loadConfig({ THT_INTERNAL_QDRANT_URL: "http://qdrant.internal:6333" }))
|
||||
.toThrow(/internal.*qdrant|host validation|invalid/i);
|
||||
expect(() => loadConfig({ THT_INTERNAL_EMBEDDING_URL: "http://example.com:11434" }))
|
||||
.toThrow(/internal.*embedding|host validation|invalid/i);
|
||||
});
|
||||
|
||||
test("loadConfig enables the legacy workspace request only through explicit local mode", () => {
|
||||
expect(loadConfig({ THT_LEGACY_WORKSPACE_MODE: "local" }).legacyWorkspaceMode).toBe(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user