mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
System test for aptly snapshot create empty.
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
Snapshot snap4 successfully created.
|
||||||
|
You can run 'aptly publish snapshot snap4' to publish snapshot as Debian repository.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
Name: snap4
|
||||||
|
Description: Created as empty
|
||||||
|
Number of packages: 0
|
||||||
|
Packages:
|
||||||
@@ -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"]
|
fixtureCmds = ["aptly snapshot create snap1 from mirror wheezy-main"]
|
||||||
runCmd = "aptly snapshot create snap1 from mirror wheezy-contrib"
|
runCmd = "aptly snapshot create snap1 from mirror wheezy-contrib"
|
||||||
expectedCode = 1
|
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