mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +00:00
System test for aptly snapshot create empty.
This commit is contained in:
3
system/t05_snapshot/CreateSnapshot4Test_gold
Normal file
3
system/t05_snapshot/CreateSnapshot4Test_gold
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
Snapshot snap4 successfully created.
|
||||
You can run 'aptly publish snapshot snap4' to publish snapshot as Debian repository.
|
||||
4
system/t05_snapshot/CreateSnapshot4Test_snapshot_show
Normal file
4
system/t05_snapshot/CreateSnapshot4Test_snapshot_show
Normal file
@@ -0,0 +1,4 @@
|
||||
Name: snap4
|
||||
Description: Created as empty
|
||||
Number of packages: 0
|
||||
Packages:
|
||||
1
system/t05_snapshot/CreateSnapshot5Test_gold
Normal file
1
system/t05_snapshot/CreateSnapshot5Test_gold
Normal file
@@ -0,0 +1 @@
|
||||
ERROR: unable to add snapshot: snapshot with name snap5 already exists
|
||||
@@ -34,3 +34,26 @@ class CreateSnapshot3Test(BaseTest):
|
||||
fixtureCmds = ["aptly snapshot create snap1 from mirror wheezy-main"]
|
||||
runCmd = "aptly snapshot create snap1 from mirror wheezy-contrib"
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
class CreateSnapshot4Test(BaseTest):
|
||||
"""
|
||||
create snapshot: empty
|
||||
"""
|
||||
runCmd = "aptly snapshot create snap4 empty"
|
||||
|
||||
def check(self):
|
||||
def remove_created_at(s):
|
||||
return re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly snapshot show -with-packages snap4", "snapshot_show", match_prepare=remove_created_at)
|
||||
|
||||
|
||||
class CreateSnapshot5Test(BaseTest):
|
||||
"""
|
||||
create snapshot: empty duplicate name
|
||||
"""
|
||||
fixtureCmds = ["aptly snapshot create snap5 empty"]
|
||||
runCmd = "aptly snapshot create snap5 empty"
|
||||
expectedCode = 1
|
||||
|
||||
Reference in New Issue
Block a user