Skip to content
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

test(daemon): Refactor daemon test suite #2170

Merged
merged 3 commits into from
Mar 22, 2024

Conversation

rekmarks
Copy link
Contributor

@rekmarks rekmarks commented Mar 22, 2024

Fixes #2125

Refactors test-endo.js by introducing utilities to absorb the necessary boilerplate to get from an empty state to a reference to a live endo host. Also addresses #2125 by ensuring that test teardown will always run, even in the case of test failures. There should no longer be any dangling node processes after running yarn test, and it may even be possible to forego the use of test:clean and its rm -rf /tmp prelude in the general case.

@rekmarks rekmarks changed the title test(daemon): Refactor test.endo.js test(daemon): Refactor daemon test suite Mar 22, 2024
Progresses #2125

Extracts locator setup into utility function and adds test teardown that
will always run, except in cases of multiple locators being created. The
multiple locator case will be handled in a follow-up.

This fully resolves #2125, except in cases where tests that create
multiple locators fail.
@rekmarks rekmarks force-pushed the rekmarks-daemon-test-refactor branch from 75c4fc6 to ceba6e2 Compare March 22, 2024 23:04
@rekmarks rekmarks requested a review from kriskowal March 22, 2024 23:08
@rekmarks rekmarks marked this pull request as ready for review March 22, 2024 23:08
@rekmarks rekmarks force-pushed the rekmarks-daemon-test-refactor branch from ceba6e2 to 004d46a Compare March 22, 2024 23:18
@rekmarks rekmarks force-pushed the rekmarks-daemon-test-refactor branch from 004d46a to c574333 Compare March 22, 2024 23:19
Copy link
Member

@kriskowal kriskowal left a comment

Choose a reason for hiding this comment

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

🏜️

@rekmarks rekmarks merged commit 2ca4788 into master Mar 22, 2024
18 checks passed
@rekmarks rekmarks deleted the rekmarks-daemon-test-refactor branch March 22, 2024 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

daemon: Tests do not clean up after themselves
2 participants