Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Internal improvement: return cleanup callback from sandbox test utility and update tests #5641

Merged
merged 8 commits into from
Nov 2, 2022

Conversation

eggplantzzz
Copy link
Contributor

@eggplantzzz eggplantzzz commented Oct 25, 2022

While performing some testing locally I noticed that some of the temporary test project files were getting left on my computer and not deleted. tmp is supposed to clean up after itself but perhaps in some cases, say when an error is thrown, it doesn't. In order to try and tidy things up, this PR returns the manual cleanup callback from tmp from the sandbox utility. It then adds the call to the cleanup function in all tests that utilize the sandbox utility.

Copy link
Member

@cds-amal cds-amal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great idea! I have one naming nit, and otherwise it looks good.

packages/truffle/test/scenarios/sandbox.js Outdated Show resolved Hide resolved
@eggplantzzz eggplantzzz force-pushed the update-sandbox branch 5 times, most recently from a102e04 to 9d8602d Compare October 28, 2022 20:40
Copy link
Member

@cds-amal cds-amal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one small nit

packages/truffle/test/scenarios/commandRunner.js Outdated Show resolved Hide resolved
Copy link
Member

@cds-amal cds-amal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¡Me gusta!

Copy link
Contributor

@dongmingh dongmingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea to have a callback to clean up.

@eggplantzzz eggplantzzz merged commit e36fbbe into develop Nov 2, 2022
@eggplantzzz eggplantzzz deleted the update-sandbox branch November 2, 2022 21:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants