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

utils/copy:chore - skip symlink files and improve tests assertiveness #782

Merged
merged 1 commit into from
Nov 19, 2021

Conversation

matheusalcantarazup
Copy link
Contributor

Previously if some symlink exists on project path during the copy we was
creating a directory instead evaluating the sysmlink.

Evaluating the symlink makes us need to deal with several scenarios,
such as, how should we copy a file to the .horuse folder when it is not
in the project path? Another scenario would be how do we handle symlinks
from files that don't exist on the user's machine?

With that in mind, this commit changes the behavior of the Copy function
to ignore symlinks by default and only copy directories and files. Since
previously we were no longer analyzing sysmlinks, this change will not be
noticed by the user.

This commit also change the assertiveness of tests to check if all files
and directories was copied correctly.

Updates #718

Signed-off-by: Matheus Alcantara matheus.alcantara@zup.com.br

- What I did

- How to verify it

- Description for the changelog

@matheusalcantarazup matheusalcantarazup changed the title utils/copy:chore - skip symlink files and improve tests assertivity utils/copy:chore - skip symlink files and improve tests assertiveness Nov 17, 2021
Previously if some symlink exists on project path during the copy we was
creating a directory instead evaluating the sysmlink.

Evaluating the symlink makes us need to deal with several scenarios,
such as, how should we copy a file to the .horuse folder when it is not
in the project path? Another scenario would be how do we handle symlinks
from files that don't exist on the user's machine?

With that in mind, this commit changes the behavior of the `Copy` function
to ignore symlinks by default and only copy directories and files. Since
previously we were no longer analyzing sysmlinks, this change will not be
noticed by the user.

This commit also change the assertiveness of tests to check if all files
and directories was copied correctly.

Updates #718

Signed-off-by: Matheus Alcantara <matheus.alcantara@zup.com.br>
@nathanmartinszup nathanmartinszup merged commit d68e166 into main Nov 19, 2021
@matheusalcantarazup matheusalcantarazup deleted the copy-tests branch November 19, 2021 11:58
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.

3 participants