mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-02 04:50:49 +00:00
26098f6c8d
Use CDN-backed Debian mirror to make tests run faster hopefully for everyone. Redirects might be important to know what exactly is going on when items are being downloaded.
47 lines
1.0 KiB
Python
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://cdn-fastly.deb.debian.org/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
|