test(rtt): use black-box telegram harness

This commit is contained in:
Ayaan Zaidi
2026-05-01 13:55:13 +05:30
parent 9aad403b7f
commit 86a563e899
2 changed files with 2 additions and 4 deletions

View File

@@ -104,7 +104,6 @@ export function createHarnessEnv(params: {
OPENCLAW_NPM_TELEGRAM_PACKAGE_LABEL: `${params.spec} (${params.version})`,
OPENCLAW_NPM_TELEGRAM_PROVIDER_MODE: params.providerMode,
OPENCLAW_NPM_TELEGRAM_SCENARIOS: params.scenarios.join(","),
OPENCLAW_NPM_TELEGRAM_SKIP_HOTPATH: "1",
OPENCLAW_NPM_TELEGRAM_OUTPUT_DIR: params.rawOutputDir,
OPENCLAW_NPM_TELEGRAM_FAST: params.baseEnv.OPENCLAW_NPM_TELEGRAM_FAST ?? "1",
OPENCLAW_QA_TELEGRAM_CANARY_TIMEOUT_MS: String(params.timeoutMs),
@@ -120,7 +119,7 @@ export function assertRequiredEnv(env: NodeJS.ProcessEnv) {
}
export async function assertHarnessRoot(harnessRoot: string) {
const scriptPath = path.join(harnessRoot, "scripts/e2e/npm-telegram-live-docker.sh");
const scriptPath = path.join(harnessRoot, "scripts/e2e/npm-telegram-rtt-docker.sh");
try {
await fs.access(scriptPath);
} catch {
@@ -164,7 +163,7 @@ export async function appendJsonl(pathname: string, value: unknown) {
}
export async function runHarness(params: { env: NodeJS.ProcessEnv; harnessRoot: string }) {
const scriptPath = path.join(params.harnessRoot, "scripts/e2e/npm-telegram-live-docker.sh");
const scriptPath = path.join(params.harnessRoot, "scripts/e2e/npm-telegram-rtt-docker.sh");
const child = spawn("bash", [scriptPath], {
cwd: params.harnessRoot,
env: params.env,

View File

@@ -63,7 +63,6 @@ describe("RTT harness", () => {
expect(env.OPENCLAW_NPM_TELEGRAM_PACKAGE_LABEL).toBe("openclaw@beta (2026.4.30-beta.1)");
expect(env.OPENCLAW_NPM_TELEGRAM_PROVIDER_MODE).toBe("mock-openai");
expect(env.OPENCLAW_NPM_TELEGRAM_SCENARIOS).toBe("telegram-mentioned-message-reply");
expect(env.OPENCLAW_NPM_TELEGRAM_SKIP_HOTPATH).toBe("1");
expect(env.OPENCLAW_NPM_TELEGRAM_OUTPUT_DIR).toBe(".artifacts/rtt/run/raw");
expect(env.OPENCLAW_NPM_TELEGRAM_FAST).toBe("0");
expect(env.OPENCLAW_QA_TELEGRAM_CANARY_TIMEOUT_MS).toBe("180000");