System tests for mirror create with filter. #64

This commit is contained in:
Andrey Smirnov
2014-07-16 13:45:46 +04:00
parent fe1046a7a3
commit 69ad2ccd84
4 changed files with 49 additions and 0 deletions
+22
View File
@@ -251,3 +251,25 @@ class CreateMirror21Test(BaseTest):
self.check_output()
self.check_cmd_output("aptly mirror show mirror21", "mirror_show", match_prepare=removeSHA512)
class CreateMirror22Test(BaseTest):
"""
create mirror: mirror with filter
"""
runCmd = "aptly mirror create -ignore-signatures -filter='nginx | Priority (required)' mirror22 http://security.debian.org/ wheezy/updates main"
def check(self):
def removeDates(s):
return re.sub(r"(Date|Valid-Until): [,0-9:+A-Za-z -]+\n", "", s)
self.check_output()
self.check_cmd_output("aptly mirror show mirror22", "mirror_show", match_prepare=removeDates)
class CreateMirror23Test(BaseTest):
"""
create mirror: mirror with wrong filter
"""
runCmd = "aptly mirror create -ignore-signatures -filter='nginx | ' mirror23 http://security.debian.org/ wheezy/updates main"
expectedCode = 1