mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Add options --with-packages to show list of packages in snapshot & mirror.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
Name: snap1
|
||||
Created At: 2014-01-24 13:06:43 MSK
|
||||
Description: Snapshot from mirror [wheezy-non-free]: http://mirror.yandex.ru/debian/ wheezy
|
||||
Number of packages: 661
|
||||
@@ -14,7 +14,7 @@ class CreateSnapshot1Test(BaseTest):
|
||||
return re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly snapshot show snap1", "snapshot_show", match_prepare=remove_created_at)
|
||||
self.check_cmd_output("aptly snapshot show -with-packages snap1", "snapshot_show", match_prepare=remove_created_at)
|
||||
|
||||
|
||||
class CreateSnapshot2Test(BaseTest):
|
||||
|
||||
@@ -18,7 +18,7 @@ class MergeSnapshot1Test(BaseTest):
|
||||
return re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly snapshot show snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
self.check_cmd_output("aptly snapshot show -with-packages snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
|
||||
|
||||
class MergeSnapshot2Test(BaseTest):
|
||||
@@ -53,7 +53,7 @@ class MergeSnapshot3Test(BaseTest):
|
||||
return re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly snapshot show snap4", "snapshot_show", match_prepare=remove_created_at)
|
||||
self.check_cmd_output("aptly snapshot show -with-packages snap4", "snapshot_show", match_prepare=remove_created_at)
|
||||
|
||||
|
||||
class MergeSnapshot4Test(BaseTest):
|
||||
|
||||
@@ -19,7 +19,7 @@ class PullSnapshot1Test(BaseTest):
|
||||
return re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly snapshot show snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
self.check_cmd_output("aptly snapshot show -with-packages snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
|
||||
|
||||
class PullSnapshot2Test(BaseTest):
|
||||
@@ -39,7 +39,7 @@ class PullSnapshot2Test(BaseTest):
|
||||
return re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly snapshot show snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
self.check_cmd_output("aptly snapshot show -with-packages snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
|
||||
|
||||
class PullSnapshot3Test(BaseTest):
|
||||
@@ -59,7 +59,7 @@ class PullSnapshot3Test(BaseTest):
|
||||
return re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly snapshot show snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
self.check_cmd_output("aptly snapshot show -with-packages snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
|
||||
|
||||
class PullSnapshot4Test(BaseTest):
|
||||
@@ -136,6 +136,4 @@ class PullSnapshot8Test(BaseTest):
|
||||
return re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly snapshot show snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
|
||||
|
||||
self.check_cmd_output("aptly snapshot show --with-packages snap3", "snapshot_show", match_prepare=remove_created_at)
|
||||
|
||||
@@ -8,7 +8,7 @@ class ShowSnapshot1Test(BaseTest):
|
||||
"""
|
||||
fixtureDB = True
|
||||
fixtureCmds = ["aptly snapshot create snap1 from mirror wheezy-non-free"]
|
||||
runCmd = "aptly snapshot show snap1"
|
||||
runCmd = "aptly snapshot show --with-packages snap1"
|
||||
outputMatchPrepare = lambda _, s: re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
|
||||
@@ -19,3 +19,13 @@ class ShowSnapshot2Test(BaseTest):
|
||||
fixtureDB = True
|
||||
runCmd = "aptly snapshot show no-such-snapshot"
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
class ShowSnapshot3Test(BaseTest):
|
||||
"""
|
||||
show snapshot: from mirror w/o packages
|
||||
"""
|
||||
fixtureDB = True
|
||||
fixtureCmds = ["aptly snapshot create snap1 from mirror wheezy-non-free"]
|
||||
runCmd = "aptly snapshot show snap1"
|
||||
outputMatchPrepare = lambda _, s: re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
Reference in New Issue
Block a user