Raw (machine-readable) format for aptly mirror/repo/snapshot list. #27

This commit is contained in:
Andrey Smirnov
2014-04-15 10:43:36 +04:00
parent ce615facf9
commit 90dd21b270
13 changed files with 167 additions and 43 deletions
+12
View File
@@ -0,0 +1,12 @@
gnuplot-maverick
gnuplot-maverick-src
wheezy-backports
wheezy-backports-src
wheezy-contrib
wheezy-contrib-src
wheezy-main
wheezy-main-src
wheezy-non-free
wheezy-non-free-src
wheezy-updates
wheezy-updates-src
+15
View File
@@ -19,3 +19,18 @@ class ListMirror2Test(BaseTest):
list mirrors: empty list
"""
runCmd = "aptly mirror list"
class ListMirror3Test(BaseTest):
"""
list mirrors: raw list
"""
fixtureDB = True
runCmd = "aptly -raw mirror list"
class ListMirror4Test(BaseTest):
"""
list mirrors: raw empty list
"""
runCmd = "aptly -raw mirror list"
@@ -0,0 +1,5 @@
snap1
snap2
snap3
snap4
snap5
+24
View File
@@ -23,3 +23,27 @@ class ListSnapshot2Test(BaseTest):
list snapshots: empty list
"""
runCmd = "aptly snapshot list"
class ListSnapshot3Test(BaseTest):
"""
list snapshots: raw regular list
"""
fixtureDB = True
fixtureCmds = [
"aptly snapshot create snap1 from mirror wheezy-main",
"aptly snapshot create snap2 from mirror wheezy-contrib",
"aptly snapshot merge snap3 snap1 snap2",
"aptly snapshot pull snap1 snap2 snap4 mame unrar",
"aptly repo create local-repo",
"aptly repo add local-repo ${files}",
"aptly snapshot create snap5 from repo local-repo",
]
runCmd = "aptly -raw snapshot list"
class ListSnapshot4Test(BaseTest):
"""
list snapshots: raw empty list
"""
runCmd = "aptly snapshot -raw list"
+1 -1
View File
@@ -1,4 +1,4 @@
List of mirrors:
List of local repos:
* [repo1] (packages: 0)
* [repo2]: Cool2 (packages: 0)
* [repo3]: Cool3 (packages: 0)
View File
+3
View File
@@ -0,0 +1,3 @@
repo1
repo2
repo3
+19
View File
@@ -18,3 +18,22 @@ class ListRepo2Test(BaseTest):
"aptly repo create repo1",
]
runCmd = "aptly repo list"
class ListRepo3Test(BaseTest):
"""
list local repos: raw no repos
"""
runCmd = "aptly -raw repo list"
class ListRepo4Test(BaseTest):
"""
list local repo: raw normal
"""
fixtureCmds = [
"aptly repo create -comment=Cool3 repo3",
"aptly repo create -comment=Cool2 repo2",
"aptly repo create repo1",
]
runCmd = "aptly repo list -raw"