mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +00:00
Add -json output flag to repo list|show
Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
This commit is contained in:
committed by
Lorenzo Bolla
parent
f9d08e1377
commit
1f56fb86e3
1
system/t09_repo/ListRepo5Test_gold
Normal file
1
system/t09_repo/ListRepo5Test_gold
Normal file
@@ -0,0 +1 @@
|
||||
[]
|
||||
20
system/t09_repo/ListRepo6Test_gold
Normal file
20
system/t09_repo/ListRepo6Test_gold
Normal file
@@ -0,0 +1,20 @@
|
||||
[
|
||||
{
|
||||
"Name": "repo1",
|
||||
"Comment": "",
|
||||
"DefaultDistribution": "",
|
||||
"DefaultComponent": "main"
|
||||
},
|
||||
{
|
||||
"Name": "repo2",
|
||||
"Comment": "Cool2",
|
||||
"DefaultDistribution": "",
|
||||
"DefaultComponent": "main"
|
||||
},
|
||||
{
|
||||
"Name": "repo3",
|
||||
"Comment": "Cool3",
|
||||
"DefaultDistribution": "",
|
||||
"DefaultComponent": "main"
|
||||
}
|
||||
]
|
||||
7
system/t09_repo/ShowRepo4Test_gold
Normal file
7
system/t09_repo/ShowRepo4Test_gold
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"Name": "repo1",
|
||||
"Comment": "Cool",
|
||||
"DefaultDistribution": "squeeze",
|
||||
"DefaultComponent": "main",
|
||||
"Packages": []
|
||||
}
|
||||
12
system/t09_repo/ShowRepo5Test_gold
Normal file
12
system/t09_repo/ShowRepo5Test_gold
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"Name": "repo2",
|
||||
"Comment": "Cool",
|
||||
"DefaultDistribution": "wheezy",
|
||||
"DefaultComponent": "contrib",
|
||||
"Packages": [
|
||||
"Pi386 libboost-program-options-dev 1.49.0.1 918d2f433384e378",
|
||||
"Pi386 libboost-program-options-dev 1.62.0.1 7760e62f99c551cb",
|
||||
"Psource pyspi 0.6.1-1.3 3a8b37cbd9a3559e",
|
||||
"Psource pyspi 0.6.1-1.4 f8f1daa806004e89"
|
||||
]
|
||||
}
|
||||
@@ -37,3 +37,20 @@ class ListRepo4Test(BaseTest):
|
||||
"aptly repo create repo1",
|
||||
]
|
||||
runCmd = "aptly repo list -raw"
|
||||
|
||||
class ListRepo5Test(BaseTest):
|
||||
"""
|
||||
list local repo: json no repos
|
||||
"""
|
||||
runCmd = "aptly repo list -json"
|
||||
|
||||
class ListRepo6Test(BaseTest):
|
||||
"""
|
||||
list local repo: json normal
|
||||
"""
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool3 repo3",
|
||||
"aptly repo create -comment=Cool2 repo2",
|
||||
"aptly repo create repo1",
|
||||
]
|
||||
runCmd = "aptly repo list -json"
|
||||
|
||||
@@ -26,3 +26,22 @@ class ShowRepo3Test(BaseTest):
|
||||
"""
|
||||
expectedCode = 1
|
||||
runCmd = "aptly repo show repo3"
|
||||
|
||||
|
||||
class ShowRepo4Test(BaseTest):
|
||||
"""
|
||||
show local repo: json regular
|
||||
"""
|
||||
fixtureCmds = ["aptly repo create -comment=Cool -distribution=squeeze repo1"]
|
||||
runCmd = "aptly repo show -json repo1"
|
||||
|
||||
|
||||
class ShowRepo5Test(BaseTest):
|
||||
"""
|
||||
show local repo: json -with-packages
|
||||
"""
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=wheezy -component=contrib repo2",
|
||||
"aptly repo add repo2 ${files}"
|
||||
]
|
||||
runCmd = "aptly repo show -json -with-packages repo2"
|
||||
|
||||
Reference in New Issue
Block a user