Skip to content

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
@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.

2 participants