Add options --with-packages to show list of packages in snapshot & mirror.

This commit is contained in:
Andrey Smirnov
2014-01-28 12:26:05 +04:00
parent 00bb27fcea
commit c538ca8cc6
12 changed files with 427 additions and 23 deletions
@@ -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
+1 -1
View File
@@ -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):
+2 -2
View File
@@ -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):
+4 -6
View File
@@ -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)
+11 -1
View File
@@ -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)