mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Command aptly mirror edit with tests. #63
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
from lib import BaseTest
|
||||
|
||||
|
||||
class EditMirror1Test(BaseTest):
|
||||
"""
|
||||
edit mirror: enable filter
|
||||
"""
|
||||
fixtureDB = True
|
||||
runCmd = "aptly mirror edit -filter=nginx -filter-with-deps wheezy-main"
|
||||
|
||||
def check(self):
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly mirror show wheezy-main", "mirror_show")
|
||||
|
||||
|
||||
class EditMirror2Test(BaseTest):
|
||||
"""
|
||||
edit mirror: missing mirror
|
||||
"""
|
||||
runCmd = "aptly mirror edit wheezy-main"
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
class EditMirror3Test(BaseTest):
|
||||
"""
|
||||
edit mirror: no changes
|
||||
"""
|
||||
fixtureDB = True
|
||||
runCmd = "aptly mirror edit wheezy-main"
|
||||
|
||||
def check(self):
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly mirror show wheezy-main", "mirror_show")
|
||||
|
||||
|
||||
class EditMirror4Test(BaseTest):
|
||||
"""
|
||||
edit mirror: wrong query
|
||||
"""
|
||||
fixtureDB = True
|
||||
runCmd = "aptly mirror edit -filter=| wheezy-main"
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
class EditMirror5Test(BaseTest):
|
||||
"""
|
||||
edit mirror: remove filter
|
||||
"""
|
||||
fixtureCmds = [
|
||||
"aptly mirror create -ignore-signatures -filter='nginx | Priority (required)' mirror5 http://security.debian.org/ wheezy/updates main",
|
||||
]
|
||||
runCmd = "aptly mirror edit -filter= mirror5"
|
||||
|
||||
def check(self):
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly mirror show mirror5", "mirror_show")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user