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,2 @@
|
||||
|
||||
Local repo repo1 -> repo2 has been successfully renamed.
|
||||
@@ -0,0 +1,4 @@
|
||||
List of local repos:
|
||||
* [repo2] (packages: 0)
|
||||
|
||||
To get more information about local repository, run `aptly repo show <name>`.
|
||||
@@ -0,0 +1 @@
|
||||
ERROR: unable to rename: local repo with name repo2 not found
|
||||
@@ -0,0 +1 @@
|
||||
ERROR: unable to rename: local repo repo4 already exists
|
||||
@@ -12,3 +12,4 @@ from .list import *
|
||||
from .move import *
|
||||
from .remove import *
|
||||
from .show import *
|
||||
from .rename import *
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
from lib import BaseTest
|
||||
|
||||
|
||||
class RenameRepo1Test(BaseTest):
|
||||
"""
|
||||
rename repo: regular operations
|
||||
"""
|
||||
fixtureCmds = [
|
||||
"aptly repo create repo1",
|
||||
]
|
||||
runCmd = "aptly repo rename repo1 repo2"
|
||||
|
||||
def check(self):
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly repo list", "repo_list")
|
||||
|
||||
|
||||
class RenameRepo2Test(BaseTest):
|
||||
"""
|
||||
rename repo: missing repo
|
||||
"""
|
||||
runCmd = "aptly repo rename repo2 repo3"
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
class RenameRepo3Test(BaseTest):
|
||||
"""
|
||||
rename repo: already exists
|
||||
"""
|
||||
fixtureCmds = [
|
||||
"aptly repo create repo3",
|
||||
"aptly repo create repo4",
|
||||
]
|
||||
runCmd = "aptly repo rename repo3 repo4"
|
||||
expectedCode = 1
|
||||
Reference in New Issue
Block a user