Add system test for disabled legacy pool path support

This commit is contained in:
Andrey Smirnov
2017-04-26 23:43:04 +03:00
parent 186bb2dff0
commit 1941418c10
4 changed files with 41 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
{
"rootDir": "/Users/smira/.aptly",
"rootDir": "${HOME}/.aptly",
"downloadConcurrency": 4,
"downloadSpeedLimit": 0,
"architectures": [],

View File

@@ -1,5 +1,5 @@
{
"rootDir": "/Users/smira/.aptly",
"rootDir": "${HOME}/.aptly",
"downloadConcurrency": 4,
"downloadSpeedLimit": 0,
"architectures": [],

View File

@@ -0,0 +1,11 @@
Applying filter...
Building download queue...
Download queue: 1 items (2.67 KiB)
Downloading & parsing package files...
Downloading http://mirror.yandex.ru/debian/dists/wheezy/Release...
Downloading http://mirror.yandex.ru/debian/dists/wheezy/main/binary-i386/Packages.bz2...
Downloading http://mirror.yandex.ru/debian/pool/main/b/boost-defaults/libboost-program-options-dev_1.49.0.1_i386.deb...
Mirror `wheezy` has been successfully updated.
Packages filtered: 36024 -> 1.

View File

@@ -279,3 +279,31 @@ class UpdateMirror17Test(BaseTest):
super(UpdateMirror17Test, self).check()
# check pool
self.check_not_exists('pool/c7/6b/4bd12fd92e4dfe1b55b18a67a669_libboost-program-options-dev_1.49.0.1_i386.deb')
class UpdateMirror18Test(BaseTest):
"""
update mirrors: update for mirror but with file in pool on legacy MD5 location and disabled legacy path support
"""
longTest = False
fixtureCmds = [
"aptly mirror create -ignore-signatures -architectures=i386 -filter=libboost-program-options-dev wheezy http://mirror.yandex.ru/debian wheezy main",
]
runCmd = "aptly mirror update -ignore-signatures wheezy"
configOverride = {'skipLegacyPool': True}
def output_processor(self, output):
return "\n".join(sorted(output.split("\n")))
def prepare(self):
super(UpdateMirror18Test, self).prepare()
os.makedirs(os.path.join(os.environ["HOME"], ".aptly", "pool", "00", "35"))
shutil.copy(os.path.join(os.path.dirname(inspect.getsourcefile(BaseTest)), "files", "libboost-program-options-dev_1.49.0.1_i386.deb"),
os.path.join(os.environ["HOME"], ".aptly", "pool", "00", "35"))
def check(self):
super(UpdateMirror18Test, self).check()
# check pool
self.check_exists('pool/c7/6b/4bd12fd92e4dfe1b55b18a67a669_libboost-program-options-dev_1.49.0.1_i386.deb')