test(ci): stabilize cron interactive release check (#6016)
Some checks are pending
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none (push) Waiting to run
E2E Tests / E2E Test - macOS (push) Waiting to run

This commit is contained in:
易良 2026-06-30 01:07:50 +08:00 committed by GitHub
parent d442a150e2
commit e00fe6a27e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,9 +17,10 @@
import { describe, it, expect, afterEach } from 'vitest';
import { InteractiveSession } from './interactive-session.js';
const IS_SANDBOX =
process.env['QWEN_SANDBOX'] &&
process.env['QWEN_SANDBOX']!.toLowerCase() !== 'false';
const SANDBOX_MODE = process.env['QWEN_SANDBOX']?.toLowerCase().trim();
const IS_SANDBOX = Boolean(
SANDBOX_MODE && SANDBOX_MODE !== 'false' && SANDBOX_MODE !== '0',
);
function makeEnv(): NodeJS.ProcessEnv {
const env = { ...process.env };
@ -27,6 +28,7 @@ function makeEnv(): NodeJS.ProcessEnv {
return {
...env,
FORCE_COLOR: '1',
QWEN_CODE_LANG: 'en',
TERM: 'xterm-256color',
NODE_NO_WARNINGS: '1',
};
@ -120,18 +122,6 @@ function makeEnv(): NodeJS.ProcessEnv {
(scr) => scr.includes('ALIVE99'),
'model response ALIVE99',
);
await session.send(
'Call cron_list and tell me how many jobs exist. Say "COUNT: N"',
);
await session.waitForScreen(
(screen) =>
screen.includes('COUNT: 1') ||
screen.includes('1 job') ||
screen.includes('Active cron jobs (1)'),
'cron list showing one active job',
60_000,
);
},
);
});