Skip to content

Commit

Permalink
Adjusting the unit test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
anpicci committed Oct 16, 2024
1 parent eebab42 commit 100ac09
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/python/WMCore_t/Storage_t/Backends_t/GFAL2Impl_t.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,17 @@ def getStageOutCommandResult(self, copyCommandDict, createRemoveFileCommandResul
EXIT_STATUS=$?
echo "gfal-copy exit status: $EXIT_STATUS"
if [[ $EXIT_STATUS != 0 ]]; then
echo "ERROR: gfal-copy exited with $EXIT_STATUS"
echo "Cleaning up failed file:"
%s
echo "ERROR: gfal-copy exited with $EXIT_STATUS"
echo "Cleaning up failed file:"
{remove_command}
fi
exit $EXIT_STATUS
""" % createRemoveFileCommandResult

""".format(
remove_command=createRemoveFileCommandResult
)

return result

@mock.patch('WMCore.Storage.Backends.GFAL2Impl.os.path')
@mock.patch('WMCore.Storage.StageOutImpl.StageOutImpl.executeCommand')
def testRemoveFile_isFile(self, mock_executeCommand, mock_path):
Expand Down

0 comments on commit 100ac09

Please sign in to comment.