System tests for mirror/repo/snapshot rename commands. #63

This commit is contained in:
Andrey Smirnov
2014-07-26 17:28:16 +04:00
parent c5922737ed
commit b9c8a8d9da
18 changed files with 141 additions and 0 deletions
+37
View File
@@ -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