Files
dify/knowledge-fs/scripts/compose-middleware.test.mjs
Jyong 4ee43b8afc chore: migrate knowledge-fs source tree
Import the committed KnowledgeFS snapshot dc4072ee302317145612087ce7440851dc329fd0 under knowledge-fs/ without its Git history, local IDE settings, or build artifacts.
2026-07-20 04:54:20 -04:00

23 lines
895 B
JavaScript

import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import test from "node:test";
const compose = readFileSync(new URL("../infra/local/compose.middleware.yaml", import.meta.url), "utf8");
test("middleware compose file contains only local middleware services", () => {
assert.match(compose, /^services:$/m);
assert.match(compose, /^ {2}postgres:$/m);
assert.match(compose, /^ {2}minio:$/m);
assert.match(compose, /^ {2}minio-bootstrap:$/m);
assert.match(compose, /^ {2}unstructured:$/m);
assert.doesNotMatch(compose, /^ {2}api:$/m);
assert.doesNotMatch(compose, /^ {2}admin:$/m);
});
test("middleware compose keeps bounded local storage volumes", () => {
assert.match(compose, /^volumes:$/m);
assert.match(compose, /^ {2}postgres-data:$/m);
assert.match(compose, /^ {2}minio-data:$/m);
assert.doesNotMatch(compose, /^ {2}pnpm-store:$/m);
});