mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-06 05:30:57 +00:00
Bump Go versions for Travis, fix tests
Replace gometalinter with golangci-lint. Fix system tests (wheezy is gone, replace with stretch). Fix linter warnings.
This commit is contained in:
+40
-40
@@ -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/ wheezy"
|
||||
runCmd = "aptly mirror create --ignore-signatures mirror1 http://mirror.yandex.ru/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/ wheezy main"
|
||||
runCmd = "aptly mirror create --ignore-signatures mirror2 http://mirror.yandex.ru/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/ wheezy main contrib"
|
||||
runCmd = "aptly -architectures=i386,amd64 mirror create --ignore-signatures mirror3 http://mirror.yandex.ru/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/ wheezy life"
|
||||
runCmd = "aptly -architectures=i386,amd64 mirror create --ignore-signatures mirror4 http://mirror.yandex.ru/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/ wheezy"
|
||||
runCmd = "aptly -architectures=i386,nano68 mirror create --ignore-signatures mirror5 http://mirror.yandex.ru/debian/ stretch"
|
||||
|
||||
|
||||
class CreateMirror6Test(BaseTest):
|
||||
@@ -68,7 +68,7 @@ class CreateMirror7Test(BaseTest):
|
||||
"""
|
||||
create mirror: architectures fixed via config file
|
||||
"""
|
||||
runCmd = "aptly mirror create --ignore-signatures mirror7 http://mirror.yandex.ru/debian/ wheezy main contrib"
|
||||
runCmd = "aptly mirror create --ignore-signatures mirror7 http://mirror.yandex.ru/debian/ stretch main contrib"
|
||||
configOverride = {"architectures": ["i386", "amd64"]}
|
||||
|
||||
def check(self):
|
||||
@@ -81,9 +81,9 @@ class CreateMirror8Test(BaseTest):
|
||||
create mirror: already exists
|
||||
"""
|
||||
fixtureCmds = [
|
||||
"aptly mirror create --ignore-signatures mirror8 http://mirror.yandex.ru/debian/ wheezy main contrib"
|
||||
"aptly mirror create --ignore-signatures mirror8 http://mirror.yandex.ru/debian/ stretch main contrib"
|
||||
]
|
||||
runCmd = "aptly mirror create --ignore-signatures mirror8 http://mirror.yandex.ru/debian/ wheezy main contrib"
|
||||
runCmd = "aptly mirror create --ignore-signatures mirror8 http://mirror.yandex.ru/debian/ stretch main contrib"
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
@@ -91,11 +91,11 @@ class CreateMirror9Test(BaseTest):
|
||||
"""
|
||||
create mirror: repo with InRelease verification
|
||||
"""
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror9 http://mirror.yandex.ru/debian/ wheezy-backports"
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror9 http://mirror.yandex.ru/debian/ stretch-backports"
|
||||
fixtureGpg = True
|
||||
requiresGPG1 = True
|
||||
|
||||
def outputMatchPrepare(_, s):
|
||||
def outputMatchPrepare(self, s):
|
||||
return re.sub(r'Signature made .* using|Warning: using insecure memory!\n', '', s)
|
||||
|
||||
def check(self):
|
||||
@@ -110,12 +110,12 @@ class CreateMirror10Test(BaseTest):
|
||||
"""
|
||||
create mirror: repo with InRelease verification, failure
|
||||
"""
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror10 http://mirror.yandex.ru/debian-backports/ squeeze-backports"
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror10 http://mirror.yandex.ru/debian/ stretch-backports"
|
||||
fixtureGpg = False
|
||||
gold_processor = BaseTest.expand_environ
|
||||
expectedCode = 1
|
||||
|
||||
def outputMatchPrepare(_, s):
|
||||
def outputMatchPrepare(self, s):
|
||||
return re.sub(r'Signature made .* using|gpgv: keyblock resource .*$|gpgv: Can\'t check signature: .*$', '', s, flags=re.MULTILINE)
|
||||
|
||||
|
||||
@@ -123,10 +123,10 @@ class CreateMirror11Test(BaseTest):
|
||||
"""
|
||||
create mirror: repo with Release + Release.gpg verification
|
||||
"""
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror11 http://mirror.yandex.ru/debian/ wheezy"
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror11 http://mirror.yandex.ru/debian/ stretch"
|
||||
fixtureGpg = True
|
||||
|
||||
def outputMatchPrepare(_, s):
|
||||
def outputMatchPrepare(self, s):
|
||||
return re.sub(r'Signature made .* using', '', s)
|
||||
|
||||
def check(self):
|
||||
@@ -138,12 +138,12 @@ 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/ wheezy"
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror12 http://mirror.yandex.ru/debian/ stretch"
|
||||
fixtureGpg = False
|
||||
gold_processor = BaseTest.expand_environ
|
||||
expectedCode = 1
|
||||
|
||||
def outputMatchPrepare(_, s):
|
||||
def outputMatchPrepare(self, s):
|
||||
return re.sub(r'Signature made .* using|gpgv: keyblock resource .*$|gpgv: Can\'t check signature: .*$', '', s, flags=re.MULTILINE)
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ class CreateMirror13Test(BaseTest):
|
||||
"""
|
||||
create mirror: skip verification using config file
|
||||
"""
|
||||
runCmd = "aptly mirror create mirror13 http://mirror.yandex.ru/debian/ wheezy"
|
||||
runCmd = "aptly mirror create mirror13 http://mirror.yandex.ru/debian/ stretch"
|
||||
configOverride = {"gpgDisableVerify": True}
|
||||
|
||||
def check(self):
|
||||
@@ -163,10 +163,10 @@ class CreateMirror14Test(BaseTest):
|
||||
"""
|
||||
create mirror: flat repository
|
||||
"""
|
||||
runCmd = "aptly mirror create -keyring=aptlytest.gpg mirror14 https://cloud.r-project.org/bin/linux/debian jessie-cran3/"
|
||||
runCmd = "aptly mirror create -keyring=aptlytest.gpg mirror14 https://cloud.r-project.org/bin/linux/debian jessie-cran35/"
|
||||
fixtureGpg = True
|
||||
|
||||
def outputMatchPrepare(_, s):
|
||||
def outputMatchPrepare(self, s):
|
||||
return re.sub(r'Signature made .* using', '', s)
|
||||
|
||||
def check(self):
|
||||
@@ -181,7 +181,7 @@ class CreateMirror15Test(BaseTest):
|
||||
"""
|
||||
create mirror: flat repository + components
|
||||
"""
|
||||
runCmd = "aptly mirror create -keyring=aptlytest.gpg mirror14 https://cloud.r-project.org/bin/linux/debian jessie-cran3/ main"
|
||||
runCmd = "aptly mirror create -keyring=aptlytest.gpg mirror14 https://cloud.r-project.org/bin/linux/debian jessie-cran35/ main"
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
@@ -191,14 +191,14 @@ class CreateMirror16Test(BaseTest):
|
||||
"""
|
||||
expectedCode = 1
|
||||
|
||||
runCmd = "aptly -architectures=source mirror create -ignore-signatures mirror16 http://mirror.yandex.ru/debian/ wheezy"
|
||||
runCmd = "aptly -architectures=source mirror create -ignore-signatures mirror16 http://mirror.yandex.ru/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/ wheezy"
|
||||
runCmd = "aptly -architectures=i386 mirror create -ignore-signatures -with-sources mirror17 http://mirror.yandex.ru/debian/ stretch"
|
||||
|
||||
def check(self):
|
||||
self.check_output()
|
||||
@@ -217,7 +217,7 @@ class CreateMirror18Test(BaseTest):
|
||||
|
||||
runCmd = "aptly mirror create -keyring=aptlytest.gpg mirror18 ppa:gladky-anton/gnuplot"
|
||||
|
||||
def outputMatchPrepare(_, s):
|
||||
def outputMatchPrepare(self, s):
|
||||
return re.sub(r'Signature made .* using', '', s)
|
||||
|
||||
def check(self):
|
||||
@@ -231,9 +231,9 @@ class CreateMirror19Test(BaseTest):
|
||||
"""
|
||||
fixtureGpg = True
|
||||
|
||||
runCmd = "aptly -architectures='i386' mirror create -keyring=aptlytest.gpg -with-sources mirror19 http://security.debian.org/ wheezy/updates main"
|
||||
runCmd = "aptly -architectures='i386' mirror create -keyring=aptlytest.gpg -with-sources mirror19 http://security.debian.org/ stretch/updates main"
|
||||
|
||||
def outputMatchPrepare(_, s):
|
||||
def outputMatchPrepare(self, s):
|
||||
return re.sub(r'Signature made .* using', '', s)
|
||||
|
||||
def check(self):
|
||||
@@ -250,11 +250,11 @@ class CreateMirror20Test(BaseTest):
|
||||
"""
|
||||
fixtureGpg = True
|
||||
|
||||
runCmd = "aptly -architectures='i386' mirror create -keyring=aptlytest.gpg -with-sources mirror20 http://security.debian.org/ wheezy/updates main"
|
||||
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(_, s):
|
||||
def outputMatchPrepare(self, s):
|
||||
return s.replace('getsockopt: ', '').replace('connect: ', ''). \
|
||||
replace('proxyconnect tcp', 'http: error connecting to proxy http://127.0.0.1:3137')
|
||||
|
||||
@@ -266,7 +266,7 @@ class CreateMirror21Test(BaseTest):
|
||||
runCmd = "aptly mirror create -keyring=aptlytest.gpg mirror21 http://pkg.jenkins-ci.org/debian-stable binary/"
|
||||
fixtureGpg = True
|
||||
|
||||
def outputMatchPrepare(_, s):
|
||||
def outputMatchPrepare(self, s):
|
||||
return re.sub(r'Signature made .* using', '', s)
|
||||
|
||||
def check(self):
|
||||
@@ -284,7 +284,7 @@ class CreateMirror22Test(BaseTest):
|
||||
"""
|
||||
create mirror: mirror with filter
|
||||
"""
|
||||
runCmd = "aptly mirror create -ignore-signatures -filter='nginx | Priority (required)' mirror22 http://security.debian.org/ wheezy/updates main"
|
||||
runCmd = "aptly mirror create -ignore-signatures -filter='nginx | Priority (required)' mirror22 http://security.debian.org/ stretch/updates main"
|
||||
|
||||
def check(self):
|
||||
def removeDates(s):
|
||||
@@ -298,7 +298,7 @@ class CreateMirror23Test(BaseTest):
|
||||
"""
|
||||
create mirror: mirror with wrong filter
|
||||
"""
|
||||
runCmd = "aptly mirror create -ignore-signatures -filter='nginx | ' mirror23 http://security.debian.org/ wheezy/updates main"
|
||||
runCmd = "aptly mirror create -ignore-signatures -filter='nginx | ' mirror23 http://security.debian.org/ stretch/updates main"
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
@@ -306,10 +306,10 @@ class CreateMirror24Test(BaseTest):
|
||||
"""
|
||||
create mirror: disable config value with option
|
||||
"""
|
||||
runCmd = "aptly mirror create -ignore-signatures=false -keyring=aptlytest.gpg mirror24 http://security.debian.org/ wheezy/updates main"
|
||||
runCmd = "aptly mirror create -ignore-signatures=false -keyring=aptlytest.gpg mirror24 http://security.debian.org/ stretch/updates main"
|
||||
fixtureGpg = True
|
||||
|
||||
def outputMatchPrepare(_, s):
|
||||
def outputMatchPrepare(self, s):
|
||||
return re.sub(r'Signature made .* using', '', s)
|
||||
|
||||
configOverride = {
|
||||
@@ -321,7 +321,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/ wheezy"
|
||||
runCmd = "aptly -architectures=i386 mirror create -ignore-signatures -with-udebs mirror25 http://mirror.yandex.ru/debian/ stretch"
|
||||
|
||||
def check(self):
|
||||
self.check_output()
|
||||
@@ -366,11 +366,11 @@ 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/ wheezy-backports"
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror9 http://mirror.yandex.ru/debian/ stretch-backports"
|
||||
configOverride = {"gpgProvider": "internal"}
|
||||
fixtureGpg = True
|
||||
|
||||
def outputMatchPrepare(_, s):
|
||||
def outputMatchPrepare(self, s):
|
||||
return re.sub(r'Signature made .* using', '', s)
|
||||
|
||||
|
||||
@@ -384,7 +384,7 @@ class CreateMirror30Test(BaseTest):
|
||||
fixtureGpg = False
|
||||
expectedCode = 1
|
||||
|
||||
def outputMatchPrepare(_, s):
|
||||
def outputMatchPrepare(self, s):
|
||||
return re.sub(r'Signature made .* using', '', s)
|
||||
|
||||
|
||||
@@ -392,11 +392,11 @@ 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/ wheezy"
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror11 http://mirror.yandex.ru/debian/ stretch"
|
||||
configOverride = {"gpgProvider": "internal"}
|
||||
fixtureGpg = True
|
||||
|
||||
def outputMatchPrepare(_, s):
|
||||
def outputMatchPrepare(self, s):
|
||||
return re.sub(r'Signature made .* using', '', s)
|
||||
|
||||
|
||||
@@ -404,11 +404,11 @@ 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/ wheezy"
|
||||
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror32 http://mirror.yandex.ru/debian/ stretch"
|
||||
fixtureGpg = True
|
||||
requiresGPG2 = True
|
||||
|
||||
def outputMatchPrepare(_, s):
|
||||
def outputMatchPrepare(self, s):
|
||||
return \
|
||||
re.sub(r'([A-F0-9]{8})[A-F0-9]{8}', r'\1',
|
||||
re.sub(r'^gpgv: (Signature made .+|.+using RSA key.+)\n', '', s, flags=re.MULTILINE))
|
||||
|
||||
Reference in New Issue
Block a user