-
Notifications
You must be signed in to change notification settings - Fork 3k
npm tests poison local cache #6331
Comments
Below is a listing of files that are modified when running
https://clbin.com/y13mg |
This is incredibly useful! The next step is to fix the affected tests so that they no longer leave the system in a changed state (as long as Thanks, Chris! |
By individually invoking each test file and examining the state change I've identified the set of files that cause state change to the cache outside the npm repository.
There seems to be a deviation in how npm is invoked. I've identified 3 common ways: exec, usage of npm.load and npm.install, and through
Note that I have successfully implemented this method and changed the first 4 listed test cases to converge. My intention is to continue with this process later tonight. Any feedback that may better this method is welcome. Edit: Corrected filename |
(You mean This is a solid strategy, and is actually simpler and less labor-intensive than how I would have done it. If you start a PR with what you have so far, I can give you a more detailed review. Early feedback: This is great! The "npm Way" of cleaning up after these tests is to to write a "zzz-cleanup.js" task that will remove that cache directory after all of the other tap tests have finished, if you want to ensure that the cache directory is cleaned up after every run of "npm test". |
#6352 Here is a snapshot of my current changes. Not sure of the state of things. You can get the idea of where I am going with it.
|
@othiym23 regarding cleanup. Could you elaborate on the "npm Way" ? Is there an example of a cleanup script in the repo? From my understanding I should make a |
|
The tap tests are mostly good, but there's still a decent amount of work done to make the legacy tests safer. There's also a good argument to be made that those tests should just be folded into the tap tests (and the disabled tests should also be converted to tap tests or just nuked altogether). Either way, npm is substantially improved by @chrismeyersfsu's work on cleaning up the tap tests. |
We're closing this issue as it has gone thirty days without activity. In our experience if an issue has gone thirty days without any activity then it's unlikely to be addressed. In the case of bug reports, often the underlying issue will be addressed but finding related issues is quite difficult and often incomplete. If this was a bug report and it is still relevant then we encourage you to open it again as a new issue. If this was a feature request then you should feel free to open it again, or even better open a PR. For more information about our new issue aging policies and why we've instituted them please see our blog post. |
The tests install something in the testing user's local cache. We need to do a pass through the tests and make sure that all are creating, using, and destroying a local cache when running the test suite. All kinds of hilarious garbage is getting left in there.
The text was updated successfully, but these errors were encountered: