mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Fix system tests
This commit is contained in:
+62
-41
@@ -45,6 +45,9 @@ class UpdateMirror3Test(BaseTest):
|
||||
"aptly mirror create --ignore-signatures failure ${url} hardy main",
|
||||
]
|
||||
fixtureWebServer = "test_release"
|
||||
configOverride = {
|
||||
"downloadRetries": 0,
|
||||
}
|
||||
runCmd = "aptly mirror update --ignore-signatures failure"
|
||||
expectedCode = 1
|
||||
|
||||
@@ -60,6 +63,9 @@ class UpdateMirror4Test(BaseTest):
|
||||
"aptly mirror create --ignore-signatures failure ${url} hardy main",
|
||||
]
|
||||
fixtureWebServer = "test_release"
|
||||
configOverride = {
|
||||
"downloadRetries": 0,
|
||||
}
|
||||
runCmd = "aptly mirror update -ignore-checksums --ignore-signatures failure"
|
||||
expectedCode = 1
|
||||
|
||||
@@ -75,6 +81,9 @@ class UpdateMirror5Test(BaseTest):
|
||||
"aptly mirror create --ignore-signatures failure ${url} hardy main",
|
||||
]
|
||||
fixtureWebServer = "test_release2"
|
||||
configOverride = {
|
||||
"downloadRetries": 0,
|
||||
}
|
||||
runCmd = "aptly mirror update --ignore-signatures failure"
|
||||
expectedCode = 1
|
||||
|
||||
@@ -90,6 +99,10 @@ class UpdateMirror6Test(BaseTest):
|
||||
"aptly mirror create --ignore-signatures failure ${url} hardy main",
|
||||
]
|
||||
fixtureWebServer = "test_release2"
|
||||
configOverride = {
|
||||
"downloadRetries": 0,
|
||||
}
|
||||
|
||||
runCmd = "aptly mirror update -ignore-checksums --ignore-signatures failure"
|
||||
|
||||
def gold_processor(self, gold):
|
||||
@@ -115,6 +128,8 @@ class UpdateMirror8Test(BaseTest):
|
||||
"""
|
||||
update mirrors: with sources (already in pool)
|
||||
"""
|
||||
|
||||
skipTest = "Requesting obsolete file - maverick/InRelease"
|
||||
fixtureGpg = True
|
||||
fixturePool = True
|
||||
fixtureCmds = [
|
||||
@@ -158,6 +173,7 @@ class UpdateMirror11Test(BaseTest):
|
||||
"""
|
||||
update mirrors: update over FTP
|
||||
"""
|
||||
skipTest = "Requesting obsolete file - stretch/InRelease"
|
||||
longTest = False
|
||||
fixtureGpg = True
|
||||
requiresFTP = True
|
||||
@@ -175,6 +191,7 @@ class UpdateMirror12Test(BaseTest):
|
||||
"""
|
||||
update mirrors: update with udebs
|
||||
"""
|
||||
skipTest = "Requesting obsolete file - stretch/InRelease"
|
||||
longTest = False
|
||||
fixtureGpg = True
|
||||
fixtureCmds = [
|
||||
@@ -218,57 +235,57 @@ class UpdateMirror14Test(BaseTest):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
# # disabled because https://dl.bintray.com/smira/deb/ seems to be missing
|
||||
#
|
||||
# class UpdateMirror15Test(BaseTest):
|
||||
# """
|
||||
# update mirrors: update for mirror without MD5 checksums
|
||||
# """
|
||||
# longTest = False
|
||||
# fixtureCmds = [
|
||||
# "aptly mirror create --ignore-signatures bintray https://dl.bintray.com/smira/deb/ ./",
|
||||
# ]
|
||||
# runCmd = "aptly mirror update --ignore-signatures bintray"
|
||||
class UpdateMirror15Test(BaseTest):
|
||||
"""
|
||||
update mirrors: update for mirror without MD5 checksums
|
||||
"""
|
||||
skipTest = "Using deprecated service - bintray"
|
||||
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 output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
# def check(self):
|
||||
# super(UpdateMirror15Test, self).check()
|
||||
# # check pool
|
||||
# self.check_exists(
|
||||
# 'pool/c7/6b/4bd12fd92e4dfe1b55b18a67a669_libboost-program-options-dev_1.49.0.1_i386.deb')
|
||||
def check(self):
|
||||
super(UpdateMirror15Test, self).check()
|
||||
# check pool
|
||||
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
|
||||
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"
|
||||
as mirror lacks MD5 checksum, file would be downloaded but not re-imported
|
||||
"""
|
||||
skipTest = "Using deprecated service - bintray"
|
||||
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 output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
# def prepare(self):
|
||||
# super(UpdateMirror16Test, self).prepare()
|
||||
def prepare(self):
|
||||
super(UpdateMirror16Test, self).prepare()
|
||||
|
||||
# os.makedirs(os.path.join(
|
||||
# os.environ["HOME"], ".aptly", "pool", "00", "35"))
|
||||
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"))
|
||||
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')
|
||||
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):
|
||||
@@ -334,6 +351,7 @@ class UpdateMirror19Test(BaseTest):
|
||||
"""
|
||||
update mirrors: correct matching of Release checksums
|
||||
"""
|
||||
skipTest = "Requesting obsolete file - stretch/InRelease"
|
||||
longTest = False
|
||||
fixtureGpg = True
|
||||
fixtureCmds = [
|
||||
@@ -366,6 +384,7 @@ class UpdateMirror21Test(BaseTest):
|
||||
"""
|
||||
update mirrors: correct matching of Release checksums (internal pgp implementation)
|
||||
"""
|
||||
skipTest = "Requesting obsolete file - deb/InRelease"
|
||||
longTest = False
|
||||
configOverride = {"gpgProvider": "internal"}
|
||||
fixtureGpg = True
|
||||
@@ -398,6 +417,7 @@ class UpdateMirror23Test(BaseTest):
|
||||
"""
|
||||
update mirrors: update with installer
|
||||
"""
|
||||
skipTest = "Requesting obsolete file - stretch/InRelease"
|
||||
longTest = False
|
||||
fixtureGpg = True
|
||||
fixtureCmds = [
|
||||
@@ -414,6 +434,7 @@ class UpdateMirror24Test(BaseTest):
|
||||
"""
|
||||
update mirrors: update with installer with separate gpg file
|
||||
"""
|
||||
skipTest = "Requesting obsolete file - stretch/InRelease"
|
||||
longTest = False
|
||||
fixtureGpg = True
|
||||
fixtureCmds = [
|
||||
|
||||
Reference in New Issue
Block a user