def testUploadJenkinsNoFail(self):
"""The nofail option must prevent fatal error on upload failures"""
archive = self.__getArchiveInstance({"flags" : ["upload", "download", "nofail"]})
archive.wantUpload(True)
with TemporaryDirectory() as tmp:
with open(os.path.join(tmp, "error.buildid"), "wb") as f:
f.write(ERROR_UPLOAD_ARTIFACT)
self.__createArtifactByName(os.path.join(tmp, "result.tgz"))
# these uploads must not fail even though they do not succeed
script = archive.upload(None, "error.buildid", "result.tgz")
callJenkinsScript(script, tmp)
script = archive.uploadJenkinsLiveBuildId(None, "error.buildid", "test.buildid")
callJenkinsScript(script, tmp)
评论列表
文章目录