Check component names (that they do exist) before publish switching. #192

This commit is contained in:
Andrey Smirnov
2015-02-06 20:16:00 +03:00
parent 5d16cf06cf
commit 06502584cf
3 changed files with 18 additions and 0 deletions
@@ -0,0 +1 @@
ERROR: unable to switch: component c is not in published repository
+12
View File
@@ -388,3 +388,15 @@ class PublishSwitch11Test(BaseTest):
self.check_file_contents("public/pool/main/p/pyspi/pyspi_0.6.1.orig.tar.gz", "file")
class PublishSwitch12Test(BaseTest):
"""
publish switch: wrong component names
"""
fixtureCmds = [
"aptly snapshot create snap1 empty",
"aptly snapshot create snap2 empty",
"aptly publish snapshot -architectures=i386 -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=maverick -component=a,b snap1 snap2",
]
runCmd = "aptly publish switch -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -component=a,c maverick snap2 snap1"
expectedCode = 1