feat: extend Telegram dock commands and config hashing (#929)

Thanks @grp06.

Co-authored-by: George Pickett <gpickett00@gmail.com>
This commit is contained in:
Peter Steinberger
2026-01-15 05:25:35 +00:00
parent a2f0d335f4
commit 54fb59b8f3
9 changed files with 49 additions and 18 deletions

View File

@@ -1,5 +1,7 @@
import { describe, expect, it } from "vitest";
import { resolveConfigSnapshotHash } from "../config/config.js";
import {
connectOk,
installGatewayTestHooks,
@@ -43,12 +45,15 @@ describe("gateway config.patch", () => {
params: {},
}),
);
const getRes = await onceMessage<{ ok: boolean; payload?: { hash?: string } }>(
const getRes = await onceMessage<{ ok: boolean; payload?: { hash?: string; raw?: string } }>(
ws,
(o) => o.type === "res" && o.id === getId,
);
expect(getRes.ok).toBe(true);
const baseHash = getRes.payload?.hash;
const baseHash = resolveConfigSnapshotHash({
hash: getRes.payload?.hash,
raw: getRes.payload?.raw,
});
expect(typeof baseHash).toBe("string");
const patchId = "req-patch";