mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Add system tests for legacy pool files
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
Building download queue...
|
||||||
|
Download queue: 1 items (2.67 KiB)
|
||||||
|
Downloading & parsing package files...
|
||||||
|
Downloading https://dl.bintray.com/smira/deb/Packages.bz2...
|
||||||
|
Downloading https://dl.bintray.com/smira/deb/Release...
|
||||||
|
Downloading https://dl.bintray.com/smira/deb/libboost-program-options-dev_1.49.0.1_i386.deb...
|
||||||
|
Mirror `bintray` has been successfully updated.
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
|
||||||
|
Applying filter...
|
||||||
|
Building download queue...
|
||||||
|
Download queue: 0 items (0 B)
|
||||||
|
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...
|
||||||
|
Mirror `wheezy` has been successfully updated.
|
||||||
|
Packages filtered: 36024 -> 1.
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
import string
|
import string
|
||||||
import re
|
import re
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
import inspect
|
||||||
from lib import BaseTest
|
from lib import BaseTest
|
||||||
|
|
||||||
|
|
||||||
@@ -220,3 +223,59 @@ class UpdateMirror15Test(BaseTest):
|
|||||||
super(UpdateMirror15Test, self).check()
|
super(UpdateMirror15Test, self).check()
|
||||||
# check pool
|
# check pool
|
||||||
self.check_exists('pool/c7/6b/4bd12fd92e4dfe1b55b18a67a669_libboost-program-options-dev_1.49.0.1_i386.deb')
|
self.check_exists('pool/c7/6b/4bd12fd92e4dfe1b55b18a67a669_libboost-program-options-dev_1.49.0.1_i386.deb')
|
||||||
|
|
||||||
|
|
||||||
|
class UpdateMirror16Test(BaseTest):
|
||||||
|
"""
|
||||||
|
update mirrors: update for mirror without MD5 checksums but with file in pool on legacy MD5 location
|
||||||
|
|
||||||
|
as mirror lacks MD5 checksum, file would be downloaded but not re-imported
|
||||||
|
"""
|
||||||
|
longTest = False
|
||||||
|
fixtureCmds = [
|
||||||
|
"aptly mirror create --ignore-signatures bintray https://dl.bintray.com/smira/deb/ ./",
|
||||||
|
]
|
||||||
|
runCmd = "aptly mirror update --ignore-signatures bintray"
|
||||||
|
|
||||||
|
def output_processor(self, output):
|
||||||
|
return "\n".join(sorted(output.split("\n")))
|
||||||
|
|
||||||
|
def prepare(self):
|
||||||
|
super(UpdateMirror16Test, 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(UpdateMirror16Test, self).check()
|
||||||
|
# check pool
|
||||||
|
self.check_not_exists('pool/c7/6b/4bd12fd92e4dfe1b55b18a67a669_libboost-program-options-dev_1.49.0.1_i386.deb')
|
||||||
|
|
||||||
|
|
||||||
|
class UpdateMirror17Test(BaseTest):
|
||||||
|
"""
|
||||||
|
update mirrors: update for mirror but with file in pool on legacy MD5 location
|
||||||
|
"""
|
||||||
|
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"
|
||||||
|
|
||||||
|
def output_processor(self, output):
|
||||||
|
return "\n".join(sorted(output.split("\n")))
|
||||||
|
|
||||||
|
def prepare(self):
|
||||||
|
super(UpdateMirror17Test, 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(UpdateMirror17Test, self).check()
|
||||||
|
# check pool
|
||||||
|
self.check_not_exists('pool/c7/6b/4bd12fd92e4dfe1b55b18a67a669_libboost-program-options-dev_1.49.0.1_i386.deb')
|
||||||
|
|||||||
Reference in New Issue
Block a user