aptly mirror create system tests.

This commit is contained in:
Andrey Smirnov
2014-01-21 14:21:22 +04:00
parent 7ec27ad88c
commit e1ca459329
13 changed files with 153 additions and 8 deletions
+4
View File
@@ -0,0 +1,4 @@
Downloading http://mirror.yandex.ru/debian/dists/wheezy/Release...
Mirror [mirror1]: http://mirror.yandex.ru/debian/ wheezy successfully added.
You can run 'aptly mirror update mirror1' to download repository contents.
@@ -0,0 +1,18 @@
Name: mirror1
Archive Root URL: http://mirror.yandex.ru/debian/
Distribution: wheezy
Components: main, contrib, non-free
Architectures: amd64, armel, armhf, i386, ia64, kfreebsd-amd64, kfreebsd-i386, mips, mipsel, powerpc, s390, s390x, sparc
Last update: never
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, 14 Dec 2013 10:51:30 UTC
Description: Debian 7.3 Released 14 December 2013
Label: Debian
Origin: Debian
Suite: stable
Version: 7.3
+4
View File
@@ -0,0 +1,4 @@
Downloading http://mirror.yandex.ru/debian/dists/wheezy/Release...
Mirror [mirror2]: http://mirror.yandex.ru/debian/ wheezy successfully added.
You can run 'aptly mirror update mirror2' to download repository contents.
@@ -0,0 +1,18 @@
Name: mirror2
Archive Root URL: http://mirror.yandex.ru/debian/
Distribution: wheezy
Components: main
Architectures: amd64, armel, armhf, i386, ia64, kfreebsd-amd64, kfreebsd-i386, mips, mipsel, powerpc, s390, s390x, sparc
Last update: never
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, 14 Dec 2013 10:51:30 UTC
Description: Debian 7.3 Released 14 December 2013
Label: Debian
Origin: Debian
Suite: stable
Version: 7.3
+4
View File
@@ -0,0 +1,4 @@
Downloading http://mirror.yandex.ru/debian/dists/wheezy/Release...
Mirror [mirror3]: http://mirror.yandex.ru/debian/ wheezy successfully added.
You can run 'aptly mirror update mirror3' to download repository contents.
@@ -0,0 +1,18 @@
Name: mirror3
Archive Root URL: http://mirror.yandex.ru/debian/
Distribution: wheezy
Components: main, contrib
Architectures: i386, amd64
Last update: never
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, 14 Dec 2013 10:51:30 UTC
Description: Debian 7.3 Released 14 December 2013
Label: Debian
Origin: Debian
Suite: stable
Version: 7.3
+2
View File
@@ -0,0 +1,2 @@
Downloading http://mirror.yandex.ru/debian/dists/wheezy/Release...
ERROR: unable to fetch mirror: component life not available in repo [mirror4]: http://mirror.yandex.ru/debian/ wheezy
+2
View File
@@ -0,0 +1,2 @@
Downloading http://mirror.yandex.ru/debian/dists/wheezy/Release...
ERROR: unable to fetch mirror: architecture nano68 not available in repo [mirror5]: http://mirror.yandex.ru/debian/ wheezy
+2
View File
@@ -0,0 +1,2 @@
Downloading http://mirror.yandex.ru/debian/dists/suslik/Release...
ERROR: unable to fetch mirror: HTTP code 404 while fetching http://mirror.yandex.ru/debian/dists/suslik/Release
+5
View File
@@ -0,0 +1,5 @@
"""
Testing mirror management
"""
from .create import *
+61
View File
@@ -0,0 +1,61 @@
from lib import BaseTest
class CreateMirror1Test(BaseTest):
"""
create mirror: all architectures + all components
"""
runCmd = "aptly mirror create mirror1 http://mirror.yandex.ru/debian/ wheezy"
def check(self):
self.check_output()
self.check_cmd_output("aptly mirror show mirror1", "mirror_show")
class CreateMirror2Test(BaseTest):
"""
create mirror: all architectures and 1 component
"""
runCmd = "aptly mirror create mirror2 http://mirror.yandex.ru/debian/ wheezy main"
def check(self):
self.check_output()
self.check_cmd_output("aptly mirror show mirror2", "mirror_show")
class CreateMirror3Test(BaseTest):
"""
create mirror: some architectures and 2 components
"""
runCmd = "aptly -architectures=i386,amd64 mirror create mirror3 http://mirror.yandex.ru/debian/ wheezy main contrib"
def check(self):
self.check_output()
self.check_cmd_output("aptly mirror show mirror3", "mirror_show")
class CreateMirror4Test(BaseTest):
"""
create mirror: missing component
"""
expectedCode = 1
runCmd = "aptly -architectures=i386,amd64 mirror create mirror4 http://mirror.yandex.ru/debian/ wheezy life"
class CreateMirror5Test(BaseTest):
"""
create mirror: missing architecture
"""
expectedCode = 1
runCmd = "aptly -architectures=i386,nano68 mirror create mirror5 http://mirror.yandex.ru/debian/ wheezy"
class CreateMirror6Test(BaseTest):
"""
create mirror: missing release
"""
expectedCode = 1
runCmd = "aptly mirror create mirror6 http://mirror.yandex.ru/debian/ suslik"