Repository navigation
test(sandbox-image): remove the temporary directories tests create - #752
Merged
Merged
Conversation
Preview deployedURL: https://cloudpid-server-pr-752.ian-g-pascoe.workers.dev Built from c8977da (stage This comment updates on each push. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Each temporary directory a test creates is pushed to a
rootslist, and a hook removes the list's directories withrmSync(…, { recursive: true, force: true }). Every hook below isafterEach, except the one noted innotify.test.ts:supervisor.test.ts: a newtemporaryDirectory(prefix)helper registers the 10 sites (supervise-,gate-,memory-notes-,start-marker-,computerd-store-,earlyoom-,bridge-). They are removed in the existingafterEach, after the report servers are closed.memory-guard.test.ts: the same helper is used formemory-notes-,earlyoom-andgo-. They are removed in the existingafterEach, after the guard processes are killed.builds.test.ts:builds-is removed in the existingafterEach, after the started pids are killed with SIGKILL.notify.test.ts: the module-scope build dircloudpid-notify-is removed inafterAll, andnotify-root-inafterEach.comparison.test.ts(comparison-),changes.test.ts(changes-),workspaces.test.ts(workspaces-),toolchains.test.ts(bootstrap-,setup-) anddocker.test.ts(cloudpid-dockerd-): a newafterEach, the same as inruns.test.ts.runs.test.tsandworkspaces.tsare unchanged: the first already cleaned up, and the second creates no temporary directories.Evidence
TMPDIRafter running the 9 files on mainAfter: 0
Merge Danger
Door: two-way
Blast Radius: tests-only