mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-29 04:16:07 +00:00
Add -json flag to mirror list|show
Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
This commit is contained in:
committed by
Lorenzo Bolla
parent
d582f9bab2
commit
129eb8644d
@@ -40,3 +40,43 @@ class ShowMirror4Test(BaseTest):
|
||||
|
||||
def outputMatchPrepare(self, s):
|
||||
return re.sub(r"(Date|Valid-Until): [,0-9:+A-Za-z -]+\n", "", s)
|
||||
|
||||
|
||||
class ShowMirror5Test(BaseTest):
|
||||
"""
|
||||
show mirror: regular mirror
|
||||
"""
|
||||
fixtureCmds = ["aptly mirror create --ignore-signatures mirror1 http://cdn-fastly.deb.debian.org/debian/ stretch"]
|
||||
runCmd = "aptly mirror show -json mirror1"
|
||||
|
||||
def outputMatchPrepare(_, s):
|
||||
return re.sub(r'[ ]*"UUID": "[\w-]+",?\n', '', s)
|
||||
|
||||
|
||||
class ShowMirror6Test(BaseTest):
|
||||
"""
|
||||
show mirror: missing mirror
|
||||
"""
|
||||
runCmd = "aptly mirror show -json mirror-xx"
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
class ShowMirror7Test(BaseTest):
|
||||
"""
|
||||
show mirror: regular mirror with packages
|
||||
"""
|
||||
fixtureDB = True
|
||||
runCmd = "aptly mirror show -json --with-packages wheezy-contrib"
|
||||
|
||||
|
||||
class ShowMirror8Test(BaseTest):
|
||||
"""
|
||||
show mirror: mirror with filter
|
||||
"""
|
||||
fixtureCmds = [
|
||||
"aptly mirror create -ignore-signatures -filter='nginx | Priority (required)' -filter-with-deps=true mirror4 http://security.debian.org/ stretch/updates main"
|
||||
]
|
||||
runCmd = "aptly mirror show -json mirror4"
|
||||
|
||||
def outputMatchPrepare(self, s):
|
||||
return re.sub(r'[ ]*"UUID": "[\w-]+",?\n', '', s)
|
||||
|
||||
Reference in New Issue
Block a user