mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Tests for mirror list/show.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/Release...
|
||||
|
||||
Mirror [mirror7]: http://mirror.yandex.ru/debian/ wheezy successfully added.
|
||||
You can run 'aptly mirror update mirror7' to download repository contents.
|
||||
@@ -0,0 +1,18 @@
|
||||
Name: mirror7
|
||||
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
|
||||
@@ -0,0 +1,6 @@
|
||||
List of mirrors:
|
||||
* [mirror1]: http://mirror.yandex.ru/debian/ wheezy
|
||||
* [mirror2]: http://mirror.yandex.ru/debian/ squeeze
|
||||
* [mirror3]: http://mirror.yandex.ru/debian/ squeeze
|
||||
|
||||
To get more information about mirror, run `aptly mirror show <name>`.
|
||||
@@ -0,0 +1 @@
|
||||
No mirrors found, create one with `aptly mirror create ...`.
|
||||
@@ -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
|
||||
@@ -0,0 +1 @@
|
||||
ERROR: unable to show: mirror with name mirror-xx not found
|
||||
@@ -3,3 +3,5 @@ Testing mirror management
|
||||
"""
|
||||
|
||||
from .create import *
|
||||
from .show import *
|
||||
from .list import *
|
||||
|
||||
@@ -59,3 +59,17 @@ class CreateMirror6Test(BaseTest):
|
||||
expectedCode = 1
|
||||
|
||||
runCmd = "aptly mirror create mirror6 http://mirror.yandex.ru/debian/ suslik"
|
||||
|
||||
|
||||
class CreateMirror7Test(BaseTest):
|
||||
"""
|
||||
create mirror: architectures fixed via config file
|
||||
"""
|
||||
runCmd = "aptly mirror create mirror7 http://mirror.yandex.ru/debian/ wheezy main contrib"
|
||||
configOverride = {"architectures": ["i386", "amd64"]}
|
||||
|
||||
def check(self):
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly mirror show mirror7", "mirror_show")
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
from lib import BaseTest
|
||||
|
||||
|
||||
class ListMirror1Test(BaseTest):
|
||||
"""
|
||||
list mirrors: regular list
|
||||
"""
|
||||
fixtureCmds = [
|
||||
"aptly mirror create mirror1 http://mirror.yandex.ru/debian/ wheezy",
|
||||
"aptly mirror create mirror2 http://mirror.yandex.ru/debian/ squeeze contrib",
|
||||
"aptly -architectures=i386 mirror create mirror3 http://mirror.yandex.ru/debian/ squeeze non-free",
|
||||
]
|
||||
runCmd = "aptly mirror list"
|
||||
|
||||
|
||||
class ListMirror2Test(BaseTest):
|
||||
"""
|
||||
list mirrors: empty list
|
||||
"""
|
||||
runCmd = "aptly mirror list"
|
||||
@@ -0,0 +1,17 @@
|
||||
from lib import BaseTest
|
||||
|
||||
|
||||
class ShowMirror1Test(BaseTest):
|
||||
"""
|
||||
show mirror: regular mirror
|
||||
"""
|
||||
fixtureCmds = ["aptly mirror create mirror1 http://mirror.yandex.ru/debian/ wheezy"]
|
||||
runCmd = "aptly mirror show mirror1"
|
||||
|
||||
|
||||
class ShowMirror2Test(BaseTest):
|
||||
"""
|
||||
show mirror: missing mirror
|
||||
"""
|
||||
runCmd = "aptly mirror show mirror-xx"
|
||||
expectedCode = 1
|
||||
Reference in New Issue
Block a user