mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-15 11:57:59 +00:00
New upstream version 1.5.0+ds1
This commit is contained in:
+57
-49
@@ -7,7 +7,7 @@ class CreateMirror1Test(BaseTest):
|
||||
"""
|
||||
create mirror: all architectures + all components
|
||||
"""
|
||||
runCmd = "aptly mirror create --ignore-signatures mirror1 http://mirror.yandex.ru/debian/ stretch"
|
||||
runCmd = "aptly mirror create --ignore-signatures mirror1 http://cdn-fastly.deb.debian.org/debian/ stretch"
|
||||
|
||||
def check(self):
|
||||
self.check_output()
|
||||
@@ -18,7 +18,7 @@ class CreateMirror2Test(BaseTest):
|
||||
"""
|
||||
create mirror: all architectures and 1 component
|
||||
"""
|
||||
runCmd = "aptly mirror create --ignore-signatures mirror2 http://mirror.yandex.ru/debian/ stretch main"
|
||||
runCmd = "aptly mirror create --ignore-signatures mirror2 http://cdn-fastly.deb.debian.org/debian/ stretch main"
|
||||
|
||||
def check(self):
|
||||
self.check_output()
|
||||
@@ -29,7 +29,7 @@ class CreateMirror3Test(BaseTest):
|
||||
"""
|
||||
create mirror: some architectures and 2 components
|
||||
"""
|
||||
runCmd = "aptly -architectures=i386,amd64 mirror create --ignore-signatures mirror3 http://mirror.yandex.ru/debian/ stretch main contrib"
|
||||
runCmd = "aptly -architectures=i386,amd64 mirror create --ignore-signatures mirror3 http://cdn-fastly.deb.debian.org/debian/ stretch main contrib"
|
||||
|
||||
def check(self):
|
||||
self.check_output()
|
||||
@@ -42,7 +42,7 @@ class CreateMirror4Test(BaseTest):
|
||||
"""
|
||||
expectedCode = 1
|
||||
|
||||
runCmd = "aptly -architectures=i386,amd64 mirror create --ignore-signatures mirror4 http://mirror.yandex.ru/debian/ stretch life"
|
||||
runCmd = "aptly -architectures=i386,amd64 mirror create --ignore-signatures mirror4 http://cdn-fastly.deb.debian.org/debian/ stretch life"
|
||||
|
||||
|
||||
class CreateMirror5Test(BaseTest):
|
||||
@@ -51,7 +51,7 @@ class CreateMirror5Test(BaseTest):
|
||||
"""
|
||||
expectedCode = 1
|
||||
|
||||
runCmd = "aptly -architectures=i386,nano68 mirror create --ignore-signatures mirror5 http://mirror.yandex.ru/debian/ stretch"
|
||||
runCmd = "aptly -architectures=i386,nano68 mirror create --ignore-signatures mirror5 http://cdn-fastly.deb.debian.org/debian/ stretch"
|
||||
|
||||
|
||||
class CreateMirror6Test(BaseTest):
|
||||
@@ -61,14 +61,15 @@ class CreateMirror6Test(BaseTest):
|
||||
expectedCode = 1
|
||||
requiresGPG1 = True
|
||||
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror6 http://mirror.yandex.ru/debian/ suslik"
|
||||
configOverride = {"max-tries": 1}
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror6 http://cdn-fastly.deb.debian.org/debian/ suslik"
|
||||
|
||||
|
||||
class CreateMirror7Test(BaseTest):
|
||||
"""
|
||||
create mirror: architectures fixed via config file
|
||||
"""
|
||||
runCmd = "aptly mirror create --ignore-signatures mirror7 http://mirror.yandex.ru/debian/ stretch main contrib"
|
||||
runCmd = "aptly mirror create --ignore-signatures mirror7 http://cdn-fastly.deb.debian.org/debian/ stretch main contrib"
|
||||
configOverride = {"architectures": ["i386", "amd64"]}
|
||||
|
||||
def check(self):
|
||||
@@ -81,9 +82,9 @@ class CreateMirror8Test(BaseTest):
|
||||
create mirror: already exists
|
||||
"""
|
||||
fixtureCmds = [
|
||||
"aptly mirror create --ignore-signatures mirror8 http://mirror.yandex.ru/debian/ stretch main contrib"
|
||||
"aptly mirror create --ignore-signatures mirror8 http://cdn-fastly.deb.debian.org/debian/ stretch main contrib"
|
||||
]
|
||||
runCmd = "aptly mirror create --ignore-signatures mirror8 http://mirror.yandex.ru/debian/ stretch main contrib"
|
||||
runCmd = "aptly mirror create --ignore-signatures mirror8 http://cdn-fastly.deb.debian.org/debian/ stretch main contrib"
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
@@ -91,7 +92,7 @@ class CreateMirror9Test(BaseTest):
|
||||
"""
|
||||
create mirror: repo with InRelease verification
|
||||
"""
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror9 http://mirror.yandex.ru/debian/ stretch-backports"
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror9 http://cdn-fastly.deb.debian.org/debian/ stretch-backports"
|
||||
fixtureGpg = True
|
||||
requiresGPG1 = True
|
||||
|
||||
@@ -103,14 +104,15 @@ class CreateMirror9Test(BaseTest):
|
||||
return re.sub(r"(Date|Valid-Until): [,0-9:+A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly mirror show mirror9", "mirror_show", match_prepare=removeDates)
|
||||
self.check_cmd_output("aptly mirror show mirror9",
|
||||
"mirror_show", match_prepare=removeDates)
|
||||
|
||||
|
||||
class CreateMirror10Test(BaseTest):
|
||||
"""
|
||||
create mirror: repo with InRelease verification, failure
|
||||
"""
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror10 http://mirror.yandex.ru/debian/ stretch-backports"
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror10 http://cdn-fastly.deb.debian.org/debian/ stretch-backports"
|
||||
fixtureGpg = False
|
||||
gold_processor = BaseTest.expand_environ
|
||||
expectedCode = 1
|
||||
@@ -123,7 +125,8 @@ class CreateMirror11Test(BaseTest):
|
||||
"""
|
||||
create mirror: repo with Release + Release.gpg verification
|
||||
"""
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror11 http://mirror.yandex.ru/debian/ stretch"
|
||||
configOverride = {"max-tries": 1}
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror11 http://cdn-fastly.deb.debian.org/debian/ stretch"
|
||||
fixtureGpg = True
|
||||
|
||||
def outputMatchPrepare(self, s):
|
||||
@@ -138,7 +141,8 @@ class CreateMirror12Test(BaseTest):
|
||||
"""
|
||||
create mirror: repo with Release+Release.gpg verification, failure
|
||||
"""
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror12 http://mirror.yandex.ru/debian/ stretch"
|
||||
configOverride = {"max-tries": 1}
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror12 http://cdn-fastly.deb.debian.org/debian/ stretch"
|
||||
fixtureGpg = False
|
||||
gold_processor = BaseTest.expand_environ
|
||||
expectedCode = 1
|
||||
@@ -151,7 +155,7 @@ class CreateMirror13Test(BaseTest):
|
||||
"""
|
||||
create mirror: skip verification using config file
|
||||
"""
|
||||
runCmd = "aptly mirror create mirror13 http://mirror.yandex.ru/debian/ stretch"
|
||||
runCmd = "aptly mirror create mirror13 http://cdn-fastly.deb.debian.org/debian/ stretch"
|
||||
configOverride = {"gpgDisableVerify": True}
|
||||
|
||||
def check(self):
|
||||
@@ -174,7 +178,8 @@ class CreateMirror14Test(BaseTest):
|
||||
return re.sub(r"(Date|Valid-Until): [,0-9:+A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly mirror show mirror14", "mirror_show", match_prepare=removeDates)
|
||||
self.check_cmd_output("aptly mirror show mirror14",
|
||||
"mirror_show", match_prepare=removeDates)
|
||||
|
||||
|
||||
class CreateMirror15Test(BaseTest):
|
||||
@@ -191,14 +196,14 @@ class CreateMirror16Test(BaseTest):
|
||||
"""
|
||||
expectedCode = 1
|
||||
|
||||
runCmd = "aptly -architectures=source mirror create -ignore-signatures mirror16 http://mirror.yandex.ru/debian/ stretch"
|
||||
runCmd = "aptly -architectures=source mirror create -ignore-signatures mirror16 http://cdn-fastly.deb.debian.org/debian/ stretch"
|
||||
|
||||
|
||||
class CreateMirror17Test(BaseTest):
|
||||
"""
|
||||
create mirror: mirror with sources enabled
|
||||
"""
|
||||
runCmd = "aptly -architectures=i386 mirror create -ignore-signatures -with-sources mirror17 http://mirror.yandex.ru/debian/ stretch"
|
||||
runCmd = "aptly -architectures=i386 mirror create -ignore-signatures -with-sources mirror17 http://cdn-fastly.deb.debian.org/debian/ stretch"
|
||||
|
||||
def check(self):
|
||||
self.check_output()
|
||||
@@ -211,6 +216,7 @@ class CreateMirror18Test(BaseTest):
|
||||
"""
|
||||
fixtureGpg = True
|
||||
configOverride = {
|
||||
"max-tries": 1,
|
||||
"ppaDistributorID": "ubuntu",
|
||||
"ppaCodename": "maverick",
|
||||
}
|
||||
@@ -241,7 +247,8 @@ class CreateMirror19Test(BaseTest):
|
||||
return re.sub(r"(Date|Valid-Until): [,0-9:+A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly mirror show mirror19", "mirror_show", match_prepare=removeDates)
|
||||
self.check_cmd_output("aptly mirror show mirror19",
|
||||
"mirror_show", match_prepare=removeDates)
|
||||
|
||||
|
||||
class CreateMirror20Test(BaseTest):
|
||||
@@ -249,20 +256,30 @@ class CreateMirror20Test(BaseTest):
|
||||
create mirror: using failing HTTP_PROXY
|
||||
"""
|
||||
fixtureGpg = True
|
||||
configOverride = {"max-tries": 1}
|
||||
|
||||
runCmd = "aptly -architectures='i386' mirror create -keyring=aptlytest.gpg -with-sources mirror20 http://security.debian.org/ stretch/updates main"
|
||||
environmentOverride = {"HTTP_PROXY": "127.0.0.1:3137"}
|
||||
expectedCode = 1
|
||||
|
||||
def outputMatchPrepare(self, s):
|
||||
return s.replace('getsockopt: ', '').replace('connect: ', ''). \
|
||||
replace('proxyconnect tcp', 'http: error connecting to proxy http://127.0.0.1:3137')
|
||||
return s.replace(
|
||||
'getsockopt: ', ''
|
||||
).replace(
|
||||
'connect: ', ''
|
||||
).replace(
|
||||
'proxyconnect tcp', 'http: error connecting to proxy http://127.0.0.1:3137'
|
||||
).replace(
|
||||
'Get http://security.debian.org/dists/stretch/updates/Release:',
|
||||
'Get "http://security.debian.org/dists/stretch/updates/Release":'
|
||||
)
|
||||
|
||||
|
||||
class CreateMirror21Test(BaseTest):
|
||||
"""
|
||||
create mirror: flat repository in subdir
|
||||
"""
|
||||
configOverride = {"max-tries": 1}
|
||||
runCmd = "aptly mirror create -keyring=aptlytest.gpg mirror21 http://pkg.jenkins-ci.org/debian-stable binary/"
|
||||
fixtureGpg = True
|
||||
|
||||
@@ -277,7 +294,8 @@ class CreateMirror21Test(BaseTest):
|
||||
return re.sub(r"(Date|Valid-Until): [,0-9:+A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly mirror show mirror21", "mirror_show", match_prepare=lambda s: removeSHA512(removeDates(s)))
|
||||
self.check_cmd_output("aptly mirror show mirror21", "mirror_show",
|
||||
match_prepare=lambda s: removeSHA512(removeDates(s)))
|
||||
|
||||
|
||||
class CreateMirror22Test(BaseTest):
|
||||
@@ -291,7 +309,8 @@ class CreateMirror22Test(BaseTest):
|
||||
return re.sub(r"(Date|Valid-Until): [,0-9:+A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly mirror show mirror22", "mirror_show", match_prepare=removeDates)
|
||||
self.check_cmd_output("aptly mirror show mirror22",
|
||||
"mirror_show", match_prepare=removeDates)
|
||||
|
||||
|
||||
class CreateMirror23Test(BaseTest):
|
||||
@@ -321,7 +340,7 @@ class CreateMirror25Test(BaseTest):
|
||||
"""
|
||||
create mirror: mirror with udebs enabled
|
||||
"""
|
||||
runCmd = "aptly -architectures=i386 mirror create -ignore-signatures -with-udebs mirror25 http://mirror.yandex.ru/debian/ stretch"
|
||||
runCmd = "aptly -architectures=i386 mirror create -ignore-signatures -with-udebs mirror25 http://cdn-fastly.deb.debian.org/debian/ stretch"
|
||||
|
||||
def check(self):
|
||||
self.check_output()
|
||||
@@ -337,37 +356,25 @@ class CreateMirror26Test(BaseTest):
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
# TODO: disabled as linux.dell.com doesn't resolve
|
||||
# class CreateMirror27Test(BaseTest):
|
||||
# """
|
||||
# create mirror: component with slashes, no stripping
|
||||
# """
|
||||
# runCmd = "aptly mirror create --ignore-signatures mirror27 http://linux.dell.com/repo/community/ubuntu wheezy openmanage/740"
|
||||
|
||||
# def check(self):
|
||||
# self.check_output()
|
||||
# self.check_cmd_output("aptly mirror show mirror27", "mirror_show")
|
||||
|
||||
|
||||
class CreateMirror28Test(BaseTest):
|
||||
class CreateMirror27Test(BaseTest):
|
||||
"""
|
||||
create mirror: -force-components
|
||||
create mirror: component with slashes, no stripping
|
||||
"""
|
||||
runCmd = "aptly mirror create -ignore-signatures -force-components mirror28 http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen"
|
||||
runCmd = "aptly mirror create --ignore-signatures mirror27 https://mirror.chpc.utah.edu/pub/linux.dell.com/repo/community/ubuntu wheezy openmanage/740"
|
||||
|
||||
def outputMatchPrepare(self, s):
|
||||
return self.strip_retry_lines(s)
|
||||
|
||||
def check(self):
|
||||
def removeDates(s):
|
||||
return re.sub(r"(Date|Valid-Until): [,0-9:+A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly mirror show mirror28", "mirror_show", match_prepare=removeDates)
|
||||
self.check_cmd_output("aptly mirror show mirror27", "mirror_show")
|
||||
|
||||
|
||||
class CreateMirror29Test(BaseTest):
|
||||
"""
|
||||
create mirror: repo with InRelease verification (internal GPG implementation)
|
||||
"""
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror9 http://mirror.yandex.ru/debian/ stretch-backports"
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror9 http://cdn-fastly.deb.debian.org/debian/ stretch-backports"
|
||||
configOverride = {"gpgProvider": "internal"}
|
||||
fixtureGpg = True
|
||||
|
||||
@@ -379,8 +386,8 @@ class CreateMirror30Test(BaseTest):
|
||||
"""
|
||||
create mirror: repo with InRelease verification, failure (internal GPG implementation)
|
||||
"""
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror10 http://mirror.yandex.ru/debian-backports/ squeeze-backports"
|
||||
configOverride = {"gpgProvider": "internal"}
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror10 http://cdn-fastly.deb.debian.org/debian/ stretch"
|
||||
configOverride = {"gpgProvider": "internal", "max-tries": 1}
|
||||
gold_processor = BaseTest.expand_environ
|
||||
fixtureGpg = False
|
||||
expectedCode = 1
|
||||
@@ -393,8 +400,8 @@ class CreateMirror31Test(BaseTest):
|
||||
"""
|
||||
create mirror: repo with Release + Release.gpg verification (internal GPG implementation)
|
||||
"""
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror11 http://mirror.yandex.ru/debian/ stretch"
|
||||
configOverride = {"gpgProvider": "internal"}
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror11 http://cdn-fastly.deb.debian.org/debian/ stretch"
|
||||
configOverride = {"gpgProvider": "internal", "max-tries": 1}
|
||||
fixtureGpg = True
|
||||
|
||||
def outputMatchPrepare(self, s):
|
||||
@@ -405,7 +412,8 @@ class CreateMirror32Test(BaseTest):
|
||||
"""
|
||||
create mirror: repo with Release + Release.gpg verification (gpg2)
|
||||
"""
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror32 http://mirror.yandex.ru/debian/ stretch"
|
||||
configOverride = {"max-tries": 1}
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror32 http://cdn-fastly.deb.debian.org/debian/ stretch"
|
||||
fixtureGpg = True
|
||||
requiresGPG2 = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user