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
+2
View File
@@ -0,0 +1,2 @@
Mirror wheezy-main -> wheezy-main-cool has been successfully renamed.
@@ -0,0 +1,16 @@
List of mirrors:
* [gnuplot-maverick-src]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick [src]
* [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick
* [sensu]: http://repos.sensuapp.org/apt/ sensu
* [wheezy-backports-src]: http://mirror.yandex.ru/debian/ wheezy-backports [src]
* [wheezy-backports]: http://mirror.yandex.ru/debian/ wheezy-backports
* [wheezy-contrib-src]: http://mirror.yandex.ru/debian/ wheezy [src]
* [wheezy-contrib]: http://mirror.yandex.ru/debian/ wheezy
* [wheezy-main-cool]: http://mirror.yandex.ru/debian/ wheezy
* [wheezy-main-src]: http://mirror.yandex.ru/debian/ wheezy [src]
* [wheezy-non-free-src]: http://mirror.yandex.ru/debian/ wheezy [src]
* [wheezy-non-free]: http://mirror.yandex.ru/debian/ wheezy
* [wheezy-updates-src]: http://mirror.yandex.ru/debian/ wheezy-updates [src]
* [wheezy-updates]: http://mirror.yandex.ru/debian/ wheezy-updates
To get more information about mirror, run `aptly mirror show <name>`.
+1
View File
@@ -0,0 +1 @@
ERROR: unable to rename: mirror with name wheezy-main not found
+1
View File
@@ -0,0 +1 @@
ERROR: unable to rename: mirror wheezy-contrib already exists
+1
View File
@@ -7,3 +7,4 @@ from .show import *
from .list import *
from .update import *
from .drop import *
from .rename import *
+30
View File
@@ -0,0 +1,30 @@
from lib import BaseTest
class RenameMirror1Test(BaseTest):
"""
rename mirror: regular operations
"""
fixtureDB = True
runCmd = "aptly mirror rename wheezy-main wheezy-main-cool"
def check(self):
self.check_output()
self.check_cmd_output("aptly mirror list", "mirror_list")
class RenameMirror2Test(BaseTest):
"""
rename mirror: missing mirror
"""
runCmd = "aptly mirror rename wheezy-main wheezy-main-cool"
expectedCode = 1
class RenameMirror3Test(BaseTest):
"""
rename mirror: already exists
"""
fixtureDB = True
runCmd = "aptly mirror rename wheezy-main wheezy-contrib"
expectedCode = 1