-
Notifications
You must be signed in to change notification settings - Fork 44
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
Bugfix/8877/Fixes deletion of src on encoding error #321
Conversation
The code failed while trying to copy files from a directory that needs to be converted, dirs_exist_ok=True should fix that. Additionally, I added two checks to always make sure that we don't accidentally delete source files when they're not temporary.
Quick workaround for a failing test in zos_copy. The test has been fixed more permanently in v1.3.3 of the collection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm concerned about an assertion based on file count. Remember our test environments are sometimes shared, so this could fire up errors that are just bad timing. Let's think about a different approach, like file enumeration instead of raw counts.
Conflicts: tests/functional/modules/test_zos_copy_func.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for this change !!!
@rexemin
The code failed while trying to copy files from a directory that needs to be converted, dirs_exist_ok=True should fix that. Additionally, I added two checks to always make sure that we don't accidentally delete source files when they're not temporary.
SUMMARY
Fixes NAZARE-8877: deletion of source files when encoding conversion fails.
ISSUE TYPE
COMPONENT NAME
zos_copy
ADDITIONAL INFORMATION
The bugfix will also change test cases a bit to make sure the module doesn't delete source files when encoding conversion fails.