Skip to content

fix(test): use Flag mutation for server tests instead of moving fixtu…#1240

Open
JinyuXiang-Mimo wants to merge 1 commit into
XiaomiMiMo:mainfrom
JinyuXiang-Mimo:security/fix-file-read-vuln-v2
Open

fix(test): use Flag mutation for server tests instead of moving fixtu…#1240
JinyuXiang-Mimo wants to merge 1 commit into
XiaomiMiMo:mainfrom
JinyuXiang-Mimo:security/fix-file-read-vuln-v2

Conversation

@JinyuXiang-Mimo

Copy link
Copy Markdown
Collaborator

Revert preload.ts change that moved all test tmpdirs under cwd — this
broke 80+ tests that depend on non-git tmpdir behavior.

Instead, server tests that pass a directory via query/header now
temporarily set Flag.MIMOCODE_SERVER_PASSWORD to bypass the cwd
containment check and include auth headers in requests. Added
withServerAuth() helper to test fixtures.

…re root

Revert preload.ts change that moved all test tmpdirs under cwd — this
broke 80+ tests that depend on non-git tmpdir behavior.

Instead, server tests that pass a directory via query/header now
temporarily set Flag.MIMOCODE_SERVER_PASSWORD to bypass the cwd
containment check and include auth headers in requests. Added
withServerAuth() helper to test fixtures.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant