Files
aptly/system/t04_mirror/drop.py
Mauro Regli d1102e2e9c Fix: Pipeline dependency on deb.debian.org, replace with archive
This should fix some tests, as a lot of them are dependent on
deb.debian.org which no longer supports Debian 9 "Stretch".
Instead we use archive.debian.org which will continue to contain
"Stretch" packages for a long time.
2023-05-15 11:15:48 +02:00

47 lines
1.0 KiB
Python

from lib import BaseTest
class DropMirror1Test(BaseTest):
"""
drop mirror: regular list
"""
fixtureCmds = [
"aptly mirror create --ignore-signatures mirror1 http://archive.debian.org/debian-archive/debian/ stretch",
]
runCmd = "aptly mirror drop mirror1"
def check(self):
self.check_output()
self.check_cmd_output("aptly mirror show mirror1", "mirror_show", expected_code=1)
class DropMirror2Test(BaseTest):
"""
drop mirror: in use by snapshots
"""
fixtureDB = True
fixtureCmds = [
"aptly snapshot create wheez from mirror wheezy-main"
]
runCmd = "aptly mirror drop wheezy-main"
expectedCode = 1
class DropMirror3Test(BaseTest):
"""
drop mirror: force
"""
fixtureDB = True
fixtureCmds = [
"aptly snapshot create wheez from mirror wheezy-main"
]
runCmd = "aptly mirror drop --force wheezy-main"
class DropMirror4Test(BaseTest):
"""
drop mirror: no such mirror
"""
runCmd = "aptly mirror drop mirror1"
expectedCode = 1