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 5dbd5f7 commit 3f5b620
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 3f5b620

Please sign in to comment.