mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-11-07 06:19:43 -10:00
test(integration): snapshot the ACP parity workspace home before each run (#16251)
Compare the home listing against the pre-run snapshot instead of a hand-copied literal of TestRig's private fixture inventory, so a harness edit that seeds another home file does not red every parity scenario with a message about a runtime leak. The snapshot still catches any runtime write, including `tmp/` and `usage/`.
This commit is contained in:
1 parent
8f46161008
commit
1923e1840e
1 file changed
+6
-7
@@ -281,6 +281,8 @@ const allowOnce = () => ({
|
||||
});
|
||||
const dir = rig.testDir!;
|
||||
scenario.prepare?.(rig);
|
||||
// Snapshot the fixture's home writes before the child can touch it.
|
||||
const homeBefore = readdirSync(join(dir, '.qwen-home')).sort();
|
||||
let streamingIndex = 0;
|
||||
server = await startFakeOpenAIServer(
|
||||
({ body }) =>
|
||||
@@ -514,13 +516,10 @@ const allowOnce = () => ({
|
||||
}
|
||||
}
|
||||
// The scratch runtime keeps the session runtime's `tmp/<hash>` and
|
||||
// `usage/` out of the workspace; pin what TestRig wrote there instead
|
||||
// of relying on the snapshot diff, which only trips on the losing side
|
||||
// of a race.
|
||||
expect(readdirSync(join(dir, '.qwen-home')).sort()).toEqual([
|
||||
'settings.json',
|
||||
'trustedFolders.json',
|
||||
]);
|
||||
// `usage/` out of the workspace; pin the pre-run listing instead of
|
||||
// relying on the snapshot diff, which only trips on the losing side of
|
||||
// a race.
|
||||
expect(readdirSync(join(dir, '.qwen-home')).sort()).toEqual(homeBefore);
|
||||
return {
|
||||
requests: modelRequests(server, dir),
|
||||
dateReminders: streamingMessages(server).filter((messages) =>
|
||||
|
||||
Reference in new issue
Block a user