fix(ci): restore release integration env controls (#5121)

This commit is contained in:
易良 2026-06-15 15:56:29 +08:00 committed by GitHub
parent 136754bb1a
commit 667a25adf9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 26 additions and 0 deletions

View file

@ -57,6 +57,7 @@ describe('QWEN_HOME environment variable', () => {
// Always clean up env vars regardless of test outcome
delete process.env['QWEN_HOME'];
delete process.env['QWEN_RUNTIME_DIR'];
delete process.env['QWEN_DEBUG_LOG_FILE'];
await rig.cleanup();
});
@ -324,6 +325,7 @@ describe('QWEN_HOME environment variable', () => {
process.env['QWEN_HOME'] = customConfigDir;
process.env['QWEN_RUNTIME_DIR'] = runtimeDir;
process.env['QWEN_DEBUG_LOG_FILE'] = '1';
try {
await rig.run('say hello');

View file

@ -169,6 +169,7 @@ rpc.send({
describe('simple-mcp-server', () => {
const rig = new TestRig();
let previousLegacyMcpBlocking: string | undefined;
let previousMcpApprovalsPath: string | undefined;
beforeAll(async () => {
@ -177,6 +178,7 @@ describe('simple-mcp-server', () => {
// request fires without the MCP `add` tool wired into the model's tool
// surface, so the model answers `15` directly and `foundToolCall` stays
// false. Remove once QwenLM/qwen-code#4163 is fixed.
previousLegacyMcpBlocking = process.env['QWEN_CODE_LEGACY_MCP_BLOCKING'];
process.env['QWEN_CODE_LEGACY_MCP_BLOCKING'] = '1';
// Setup test directory with MCP server configuration
@ -238,6 +240,12 @@ describe('simple-mcp-server', () => {
});
afterAll(() => {
if (previousLegacyMcpBlocking === undefined) {
delete process.env['QWEN_CODE_LEGACY_MCP_BLOCKING'];
} else {
process.env['QWEN_CODE_LEGACY_MCP_BLOCKING'] = previousLegacyMcpBlocking;
}
if (previousMcpApprovalsPath === undefined) {
delete process.env['QWEN_CODE_MCP_APPROVALS_PATH'];
} else {