Tests for mirroring repositories with signatures.

This commit is contained in:
Andrey Smirnov
2014-02-07 12:06:38 +04:00
parent d4307ad03c
commit cf3dc6be27
9 changed files with 139 additions and 1 deletions
+50
View File
@@ -1,3 +1,5 @@
import re
from lib import BaseTest
@@ -82,3 +84,51 @@ class CreateMirror8Test(BaseTest):
]
runCmd = "aptly mirror create --ignore-signatures mirror8 http://mirror.yandex.ru/debian/ wheezy main contrib"
expectedCode = 1
class CreateMirror9Test(BaseTest):
"""
create mirror: repo with InRelease verification
"""
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror9 http://mirror.yandex.ru/debian-backports/ squeeze-backports"
fixtureGpg = True
outputMatchPrepare = lambda _, s: re.sub(r'Signature made .* using', '', s)
def check(self):
self.check_output()
self.check_cmd_output("aptly mirror show mirror9", "mirror_show")
class CreateMirror10Test(BaseTest):
"""
create mirror: repo with InRelease verification, failure
"""
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror10 http://mirror.yandex.ru/debian-backports/ squeeze-backports"
fixtureGpg = False
gold_processor = BaseTest.expand_environ
outputMatchPrepare = lambda _, s: re.sub(r'Signature made .* using', '', s)
expectedCode = 1
class CreateMirror11Test(BaseTest):
"""
create mirror: repo with Release + Release.gpg verification
"""
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror11 http://mirror.yandex.ru/debian/ squeeze"
fixtureGpg = True
outputMatchPrepare = lambda _, s: re.sub(r'Signature made .* using', '', s)
def check(self):
self.check_output()
self.check_cmd_output("aptly mirror show mirror11", "mirror_show")
class CreateMirror12Test(BaseTest):
"""
create mirror: repo with Release+Release.gpg verification, failure
"""
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror12 http://mirror.yandex.ru/debian/ squeeze"
fixtureGpg = False
gold_processor = BaseTest.expand_environ
outputMatchPrepare = lambda _, s: re.sub(r'Signature made .* using', '', s)
expectedCode = 1