mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
System tests for mirror/repo/snapshot rename commands. #63
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
from lib import BaseTest
|
||||
|
||||
|
||||
class RenameSnapshot1Test(BaseTest):
|
||||
"""
|
||||
rename snapshot: regular operations
|
||||
"""
|
||||
fixtureDB = True
|
||||
fixtureCmds = [
|
||||
"aptly snapshot create snapshot1 from mirror wheezy-contrib",
|
||||
]
|
||||
runCmd = "aptly snapshot rename snapshot1 snapshot2"
|
||||
|
||||
def check(self):
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly snapshot list", "snapshot_list")
|
||||
|
||||
|
||||
class RenameSnapshot2Test(BaseTest):
|
||||
"""
|
||||
rename snapshot: missing snapshot
|
||||
"""
|
||||
runCmd = "aptly snapshot rename snapshot2 snapshot3"
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
class RenameSnapshot3Test(BaseTest):
|
||||
"""
|
||||
rename snapshot: already exists
|
||||
"""
|
||||
fixtureDB = True
|
||||
fixtureCmds = [
|
||||
"aptly snapshot create snapshot3 from mirror wheezy-contrib",
|
||||
"aptly snapshot create snapshot4 from mirror wheezy-contrib",
|
||||
]
|
||||
runCmd = "aptly snapshot rename snapshot3 snapshot4"
|
||||
expectedCode = 1
|
||||
Reference in New Issue
Block a user