mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-08 22:30:41 +00:00
Add -json flag to publish list|show
Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
This commit is contained in:
committed by
Lorenzo Bolla
parent
129eb8644d
commit
899ed92ebc
@@ -0,0 +1 @@
|
||||
[]
|
||||
@@ -0,0 +1,97 @@
|
||||
[
|
||||
{
|
||||
"AcquireByHash": false,
|
||||
"Architectures": [
|
||||
"amd64",
|
||||
"i386"
|
||||
],
|
||||
"ButAutomaticUpgrades": "",
|
||||
"Distribution": "maverick",
|
||||
"Label": "",
|
||||
"NotAutomatic": "",
|
||||
"Origin": "LP-PPA-gladky-anton-gnuplot",
|
||||
"Path": "./maverick",
|
||||
"Prefix": ".",
|
||||
"SkipContents": false,
|
||||
"SourceKind": "snapshot",
|
||||
"Sources": [
|
||||
{
|
||||
"Component": "main",
|
||||
"Name": "snap1"
|
||||
}
|
||||
],
|
||||
"Storage": "",
|
||||
"Suite": ""
|
||||
},
|
||||
{
|
||||
"AcquireByHash": false,
|
||||
"Architectures": [
|
||||
"amd64"
|
||||
],
|
||||
"ButAutomaticUpgrades": "",
|
||||
"Distribution": "wheezy",
|
||||
"Label": "",
|
||||
"NotAutomatic": "",
|
||||
"Origin": "",
|
||||
"Path": "ppa/smira/wheezy",
|
||||
"Prefix": "ppa/smira",
|
||||
"SkipContents": false,
|
||||
"SourceKind": "snapshot",
|
||||
"Sources": [
|
||||
{
|
||||
"Component": "contrib",
|
||||
"Name": "snap2"
|
||||
}
|
||||
],
|
||||
"Storage": "",
|
||||
"Suite": ""
|
||||
},
|
||||
{
|
||||
"AcquireByHash": false,
|
||||
"Architectures": [
|
||||
"amd64",
|
||||
"i386"
|
||||
],
|
||||
"ButAutomaticUpgrades": "",
|
||||
"Distribution": "maverick",
|
||||
"Label": "",
|
||||
"NotAutomatic": "",
|
||||
"Origin": "origin1",
|
||||
"Path": "ppa/tr1/maverick",
|
||||
"Prefix": "ppa/tr1",
|
||||
"SkipContents": false,
|
||||
"SourceKind": "snapshot",
|
||||
"Sources": [
|
||||
{
|
||||
"Component": "main",
|
||||
"Name": "snap2"
|
||||
}
|
||||
],
|
||||
"Storage": "",
|
||||
"Suite": ""
|
||||
},
|
||||
{
|
||||
"AcquireByHash": false,
|
||||
"Architectures": [
|
||||
"amd64",
|
||||
"i386"
|
||||
],
|
||||
"ButAutomaticUpgrades": "",
|
||||
"Distribution": "maverick",
|
||||
"Label": "label1",
|
||||
"NotAutomatic": "",
|
||||
"Origin": "",
|
||||
"Path": "ppa/tr2/maverick",
|
||||
"Prefix": "ppa/tr2",
|
||||
"SkipContents": false,
|
||||
"SourceKind": "snapshot",
|
||||
"Sources": [
|
||||
{
|
||||
"Component": "main",
|
||||
"Name": "snap2"
|
||||
}
|
||||
],
|
||||
"Storage": "",
|
||||
"Suite": ""
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"AcquireByHash": false,
|
||||
"Architectures": [
|
||||
"amd64",
|
||||
"i386"
|
||||
],
|
||||
"ButAutomaticUpgrades": "",
|
||||
"Distribution": "maverick",
|
||||
"Label": "",
|
||||
"NotAutomatic": "",
|
||||
"Origin": "LP-PPA-gladky-anton-gnuplot",
|
||||
"Path": "./maverick",
|
||||
"Prefix": ".",
|
||||
"SkipContents": false,
|
||||
"SourceKind": "snapshot",
|
||||
"Sources": [
|
||||
{
|
||||
"Component": "main",
|
||||
"Name": "snap1"
|
||||
}
|
||||
],
|
||||
"Storage": "",
|
||||
"Suite": ""
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"AcquireByHash": false,
|
||||
"Architectures": [
|
||||
"amd64",
|
||||
"i386"
|
||||
],
|
||||
"ButAutomaticUpgrades": "",
|
||||
"Distribution": "maverick",
|
||||
"Label": "",
|
||||
"NotAutomatic": "",
|
||||
"Origin": "LP-PPA-gladky-anton-gnuplot",
|
||||
"Path": "ppa/smira/maverick",
|
||||
"Prefix": "ppa/smira",
|
||||
"SkipContents": false,
|
||||
"SourceKind": "snapshot",
|
||||
"Sources": [
|
||||
{
|
||||
"Component": "main",
|
||||
"Name": "snap1"
|
||||
}
|
||||
],
|
||||
"Storage": "",
|
||||
"Suite": ""
|
||||
}
|
||||
@@ -41,3 +41,27 @@ class PublishList3Test(BaseTest):
|
||||
"aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -label=label1 snap2 ppa/tr2",
|
||||
]
|
||||
runCmd = "aptly publish list -raw"
|
||||
|
||||
|
||||
class PublishList4Test(BaseTest):
|
||||
"""
|
||||
publish list json: empty list
|
||||
"""
|
||||
runCmd = "aptly publish list -json"
|
||||
|
||||
|
||||
class PublishList5Test(BaseTest):
|
||||
"""
|
||||
publish list json: several repos list
|
||||
"""
|
||||
fixtureDB = True
|
||||
fixturePool = True
|
||||
fixtureCmds = [
|
||||
"aptly snapshot create snap1 from mirror gnuplot-maverick",
|
||||
"aptly snapshot merge snap2 snap1",
|
||||
"aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec snap1",
|
||||
"aptly -architectures=amd64 publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=wheezy -component=contrib snap2 ppa/smira",
|
||||
"aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -origin=origin1 snap2 ppa/tr1",
|
||||
"aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -label=label1 snap2 ppa/tr2",
|
||||
]
|
||||
runCmd = "aptly publish list -json"
|
||||
|
||||
@@ -25,3 +25,29 @@ class PublishShow2Test(BaseTest):
|
||||
"aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec snap1 ppa/smira",
|
||||
]
|
||||
runCmd = "aptly publish show maverick ppa/smira"
|
||||
|
||||
|
||||
class PublishShow3Test(BaseTest):
|
||||
"""
|
||||
publish show json: existing snapshot
|
||||
"""
|
||||
fixtureDB = True
|
||||
fixturePool = True
|
||||
fixtureCmds = [
|
||||
"aptly snapshot create snap1 from mirror gnuplot-maverick",
|
||||
"aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec snap1",
|
||||
]
|
||||
runCmd = "aptly publish show -json maverick"
|
||||
|
||||
|
||||
class PublishShow4Test(BaseTest):
|
||||
"""
|
||||
publish show json: under prefix
|
||||
"""
|
||||
fixtureDB = True
|
||||
fixturePool = True
|
||||
fixtureCmds = [
|
||||
"aptly snapshot create snap1 from mirror gnuplot-maverick",
|
||||
"aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec snap1 ppa/smira",
|
||||
]
|
||||
runCmd = "aptly publish show -json maverick ppa/smira"
|
||||
|
||||
Reference in New Issue
Block a user