| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Adjusts the artifact-scanner test suite to avoid running an expensive zip-extraction/token-scan test during typical local runs, while still exercising it in CI to preserve coverage of the regression scenario.
Changes:
| File | Description |
|---|---|
| src/artifact-scanner.test.ts | Gates the slow artifact-scanning regression test to CI by default with a local opt-in environment variable. |
Sorry, something went wrong.
There was a problem hiding this comment.
Just a question about why this also changes the test to not run on Windows, given that it would only run in CI.
Aside from that, it makes sense to me to only run this in CI.
Sorry, something went wrong.
| // This test is slow (extracts and scans a zip artifact), so by default we only run it in CI. Set | ||
| // RUN_SLOW_TESTS=1 to run it locally. | ||
| if ( | ||
| os.platform() !== "win32" && |
There was a problem hiding this comment.
If we are only running this test in CI, why not also run it on Windows? Given the nature of the function being tested, it seems like we could easily miss a Windows-specific problem.
If there is a good reason why we aren't running it on Windows, it would be good if the comment noted it and explained why.
Sorry, something went wrong.
There was a problem hiding this comment.
The artifact scanner isn't compatible with Windows — it's only used in our debug artifact tests, which always run on Linux. It's not compatible because it directly shells out to extract archives.
Sorry, something went wrong.
There was a problem hiding this comment.
Ah, I had a look at the implementation but didn't see an obvious guard against running on Windows. I saw the isInTestMode() check, but I didn't verify whether we always run on Linux there.
In that case, it might be good to make this more explicit in the main implementation in scanArtifactsForTokens as well and return with a suitable message there if it is somehow running on Windows?
Sorry, something went wrong.
There was a problem hiding this comment.
Agreed, done!
Sorry, something went wrong.
| ); | ||
| } | ||
|
|
||
| if (process.platform === "win32") { |
There was a problem hiding this comment.
Of course it is win32 regardless of architecture.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The "scanArtifactsForTokens finds token in debug artifacts" test takes 4.7 seconds to complete on my machine. Run it in CI only by default.
Here's proof that it actually runs.