System tests for mirror edit with architectures. #99

This commit is contained in:
Andrey Smirnov
2014-08-29 00:52:03 +04:00
parent f19ece776d
commit 755944652f
4 changed files with 44 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
Downloading http://mirror.yandex.ru/debian/dists/wheezy/Release...
Mirror [wheezy-main]: http://mirror.yandex.ru/debian/ wheezy successfully updated.
@@ -0,0 +1,19 @@
Name: wheezy-main
Archive Root URL: http://mirror.yandex.ru/debian/
Distribution: wheezy
Components: main
Architectures: amd64, s390
Download Sources: no
Number of packages: 56121
Information from release file:
Architectures: amd64 armel armhf i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc s390 s390x sparc
Codename: wheezy
Components: main contrib non-free
Date: Sat, 12 Jul 2014 10:59:25 UTC
Description: Debian 7.6 Released 12 July 2014
Label: Debian
Origin: Debian
Suite: stable
Version: 7.6
+2
View File
@@ -0,0 +1,2 @@
Downloading http://mirror.yandex.ru/debian/dists/wheezy/Release...
ERROR: unable to edit: architecture x56 not available in repo [wheezy-main]: http://mirror.yandex.ru/debian/ wheezy
+21
View File
@@ -58,3 +58,24 @@ class EditMirror5Test(BaseTest):
self.check_output()
self.check_cmd_output("aptly mirror show mirror5", "mirror_show", match_prepare=removeDates)
class EditMirror6Test(BaseTest):
"""
edit mirror: change architectures
"""
fixtureDB = True
runCmd = "aptly mirror edit -architectures=amd64,s390 wheezy-main"
def check(self):
self.check_output()
self.check_cmd_output("aptly mirror show wheezy-main", "mirror_show", match_prepare=lambda s: re.sub(r"Last update: [0-9:+A-Za-z -]+\n", "", s))
class EditMirror7Test(BaseTest):
"""
edit mirror: change architectures to missing archs
"""
fixtureDB = True
runCmd = "aptly mirror edit -architectures=amd64,x56 wheezy-main"
expectedCode = 1