mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
System test for wrong checkums. #71
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
gpgv: DSA key ID 16DB3E6D
|
||||
gpgv: Good signature from "Aptly Tester (don't use it) <test@aptly.info>"
|
||||
[!] unable to process file hardlink_0.2.1_amd64.changes: checksum mismatch MD5: expected 4efce26825af5842f43961096dd890b3 != obtained 7515e9279fc32d0c89db965f4dfdec8c
|
||||
[!] Some files were skipped due to errors:
|
||||
/01/hardlink_0.2.1_amd64.changes
|
||||
ERROR: some files failed to be added
|
||||
@@ -145,3 +145,33 @@ class IncludeRepo6Test(BaseTest):
|
||||
super(IncludeRepo6Test, self).check()
|
||||
finally:
|
||||
shutil.rmtree(self.tempSrcDir)
|
||||
|
||||
|
||||
class IncludeRepo7Test(BaseTest):
|
||||
"""
|
||||
include packages to local repo: wrong checksum
|
||||
"""
|
||||
fixtureCmds = [
|
||||
"aptly repo create unstable",
|
||||
]
|
||||
runCmd = "aptly repo include -keyring=${files}/aptly.pub "
|
||||
outputMatchPrepare = lambda self, s: gpgRemove(self, tempDirRemove(self, s))
|
||||
expectedCode = 1
|
||||
|
||||
def prepare(self):
|
||||
super(IncludeRepo7Test, self).prepare()
|
||||
|
||||
self.tempSrcDir = tempfile.mkdtemp()
|
||||
|
||||
shutil.copytree(os.path.join(os.path.dirname(inspect.getsourcefile(BaseTest)), "changes"), os.path.join(self.tempSrcDir, "01"))
|
||||
|
||||
with open(os.path.join(self.tempSrcDir, "01", "hardlink_0.2.1.dsc"), "w") as f:
|
||||
f.write("A" * 949) # file size
|
||||
|
||||
self.runCmd += self.tempSrcDir
|
||||
|
||||
def check(self):
|
||||
try:
|
||||
super(IncludeRepo7Test, self).check()
|
||||
finally:
|
||||
shutil.rmtree(self.tempSrcDir)
|
||||
|
||||
Reference in New Issue
Block a user