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

Improve handling of old ~/.localhost directory. #30

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

ioquatix
Copy link
Member

@ioquatix ioquatix commented Apr 16, 2024

  • Ensure tests are idempotent.

Types of Changes

  • Bug fix.

Contribution

- Ensure tests are idempotent.
@ioquatix
Copy link
Member Author

ioquatix commented Apr 16, 2024

@texpert @nogweii I have made a few improvements to the test, and extracted the path handling into the .path method. Would welcome your feedback as I think you mentioned some issues with this approach, but I'm leaning more towards it as it seems more predictable.

I found a couple of issues - I don't think the mv was working correctly. I've changed that to use Dir.glob.

Also, for the sake of testing, I've made it so it always runs in an isolated directory/root.

Localhost::Authority.path now accepts an env argument (and old_root: option). This allows us to test the path computation and old_root handling functionality independently of all the other code, which I think is now completely tested (we check the files are copied, etc).

@ioquatix ioquatix merged commit ccc9330 into main Apr 16, 2024
30 of 36 checks passed
@ioquatix ioquatix deleted the improve-old_root-handling branch April 16, 2024 05:04
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.

1 participant