Commit 1c2e9e0a authored by Andrea Sciaba's avatar Andrea Sciaba
Browse files

Added removal of test file from SE

parent 15e9efd7
......@@ -217,13 +217,39 @@ class StageOutDiagnostic:
"""
_testCleanUp_
Test clean up of the temp file
Test clean up of the temp file from SE
"""
os.remove("TEST-FILE")
command = self.siteConf.localStageOut['command']
try:
implInstance = retrieveStageOutImpl(command)
except Exception, ex:
msg = "Unable to retrieve impl for clean up:\n"
msg += "Error retrieving StageOutImpl for command named: %s\n" % (
command,)
self.summary['CleanUp'] = \
"Failure: Cant retrieve StageOut Impl"
raise RuntimeError, msg
# //
# // Match LFN
#//
pfn = self.tfc.matchLFN(self.tfc.preferredProtocol, self.testLFN)
# //
# // Invoke StageOut Impl removeFile method
#//
try:
implInstance.removeFile(pfn)
except Exception, ex:
msg = "Error performing Cleanup command for impl "
msg += "%s\n" % command
msg += "On PFN: %s\n" % pfn
msg += str(ex)
self.summary['CleanUp'] = "Failure: Cleanup operation Failed"
raise RuntimeError, msg
return
if __name__ == '__main__':
diagnostic = StageOutDiagnostic()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment