mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-03 19:24:05 +00:00
test(e2e): print MCP Docker proof logs
This commit is contained in:
17
test/scripts/docker-e2e-observability.test.ts
Normal file
17
test/scripts/docker-e2e-observability.test.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
describe("Docker E2E observability", () => {
|
||||
it.each(["scripts/e2e/mcp-channels-docker.sh", "scripts/e2e/cron-mcp-cleanup-docker.sh"])(
|
||||
"prints successful MCP client proof logs from %s",
|
||||
(scriptPath) => {
|
||||
const script = readFileSync(scriptPath, "utf8");
|
||||
const successTail = script.slice(script.lastIndexOf('if [ "$status" -ne 0 ]; then'));
|
||||
|
||||
expect(successTail).toContain('cat "$CLIENT_LOG"');
|
||||
expect(successTail.indexOf('cat "$CLIENT_LOG"')).toBeLessThan(
|
||||
successTail.indexOf('echo "OK"'),
|
||||
);
|
||||
},
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user