-
Notifications
You must be signed in to change notification settings - Fork 2
Add network chaos to fork tests #1570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Add chaos providers to fork tests and modify workers to support
|
3a0d67c to
d361051
Compare
09c57e6 to
2804af1
Compare
bcfd965 to
1416ee2
Compare
02d407e to
138b611
Compare
138b611 to
6b1f17d
Compare
| runtimeConfig: RuntimeConfig, | ||
| ): boolean { | ||
| const envFlag = options.env ? `--env ${options.env}` : ""; | ||
| const command = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
execSync builds a shell command with options.logLevel, which enables shell injection. Consider validating logLevel against a safe enum (e.g., ['debug','info','warn','error']) or switch to execFile/spawn with args to avoid shell parsing.
- const command =
- `yarn test forks ${envFlag} --log ${options.logLevel} --file`.trim();
+ const logLevel = ["debug","info","warn","error"].includes(options.logLevel) ? options.logLevel : "warn";
+ const command =
+ `yarn test forks ${envFlag} --log ${logLevel} --file`.trim();🚀 Reply to ask Macroscope to explain or update this suggestion.
👍 Helpful? React to give us feedback.
6b1f17d to
a44ea29
Compare
6ee6e0f to
b96795f
Compare
5d3881f to
3620985
Compare
3620985 to
94cb0a3
Compare
5459d67 to
c11ad1b
Compare
This reverts commit 76fcd9b.
c11ad1b to
20e7ef4
Compare
api-Hypernova
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff!! Huge improvement 👍

Fork test overhaul
Refactors
yargs for the CLI arguments to simplify CLI arg parsingFeatures