mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +00:00
no direct internet download from apt repositories, which over time will change or cease to exist. also migrate to gpg2 on newer ubuntu.
47 lines
1.1 KiB
Python
47 lines
1.1 KiB
Python
from lib import BaseTest
|
|
|
|
|
|
class DropMirror1Test(BaseTest):
|
|
"""
|
|
drop mirror: regular list
|
|
"""
|
|
fixtureCmds = [
|
|
"aptly mirror create --ignore-signatures mirror1 http://repo.aptly.info/system-tests/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
|