skip acp integration test in sandbox env (#1141)

This commit is contained in:
tanzhenxin
2025-12-04 10:28:21 +08:00
committed by GitHub
parent 2ca36d7508
commit 6729980b47

View File

@@ -15,6 +15,9 @@ const REQUEST_TIMEOUT_MS = 60_000;
const INITIAL_PROMPT = 'Create a quick note (smoke test).'; const INITIAL_PROMPT = 'Create a quick note (smoke test).';
const RESUME_PROMPT = 'Continue the note after reload.'; const RESUME_PROMPT = 'Continue the note after reload.';
const LIST_SIZE = 5; const LIST_SIZE = 5;
const IS_SANDBOX =
process.env['GEMINI_SANDBOX'] &&
process.env['GEMINI_SANDBOX']!.toLowerCase() !== 'false';
type PendingRequest = { type PendingRequest = {
resolve: (value: unknown) => void; resolve: (value: unknown) => void;
@@ -86,7 +89,6 @@ function setupAcpTest(
const agent = spawn('node', [rig.bundlePath, '--experimental-acp'], { const agent = spawn('node', [rig.bundlePath, '--experimental-acp'], {
cwd: rig.testDir!, cwd: rig.testDir!,
stdio: ['pipe', 'pipe', 'pipe'], stdio: ['pipe', 'pipe', 'pipe'],
env: { ...process.env },
}); });
agent.stderr?.on('data', (chunk) => { agent.stderr?.on('data', (chunk) => {
@@ -250,7 +252,7 @@ function setupAcpTest(
}; };
} }
describe('acp integration', () => { (IS_SANDBOX ? describe.skip : describe)('acp integration', () => {
it('creates, lists, loads, and resumes a session', async () => { it('creates, lists, loads, and resumes a session', async () => {
const rig = new TestRig(); const rig = new TestRig();
rig.setup('acp load session'); rig.setup('acp load session');