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

Should Action::Overwrite in Assert::subset_eq overwrite files and dirs in expected root? #230

Open
zummenix opened this issue Aug 30, 2023 · 2 comments
Labels
A-snapbox Area: snapbox package

Comments

@zummenix
Copy link

zummenix commented Aug 30, 2023

Maybe I'm missing something or using it wrong, please let me know. Current behaviour is that it just reports ok. Seems unexpected when one wants to prepare a snapshot.

@epage
Copy link
Contributor

epage commented Aug 30, 2023

Yes, Overwrite should overwrite existing files when used with subset_eq.

Seems unexpected when one wants to prepare a snapshot.

Overwriting means replacing an existing item. It sounds like you are wanting to write out everything, whether there is an existing item or not. Is that correct?

@zummenix
Copy link
Author

It sounds like you are wanting to write out everything, whether there is an existing item or not. Is that correct?

Yes, that's correct. To clarify, overwriting works for existing items but does not if a snapshot directory is empty. Thinking about it I can workaround this issue by first running a test to create snapshot files.

@epage epage added the A-snapbox Area: snapbox package label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-snapbox Area: snapbox package
Projects
None yet
Development

No branches or pull requests

2 participants