Add -force-overwrite flag to publish update, switch, snapshot and repo commands. #90

Includes new and updated system tests.
This commit is contained in:
Andrey Smirnov
2014-08-05 17:01:18 +04:00
parent fe879acf9c
commit bb6593d21e
32 changed files with 284 additions and 6 deletions
+36
View File
@@ -273,3 +273,39 @@ class PublishUpdate8Test(BaseTest):
]
runCmd = "aptly publish update -skip-signing squeeze"
gold_processor = BaseTest.expand_environ
class PublishUpdate9Test(BaseTest):
"""
publish update: conflicting files in the repo
"""
fixtureCmds = [
"aptly repo create local-repo",
"aptly repo add local-repo ${files}",
"aptly publish repo -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=maverick local-repo",
"aptly repo remove local-repo Name",
"aptly repo add local-repo ${testfiles}",
]
runCmd = "aptly publish update -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec maverick"
expectedCode = 1
gold_processor = BaseTest.expand_environ
class PublishUpdate10Test(BaseTest):
"""
publish update: -force-overwrite
"""
fixtureCmds = [
"aptly repo create local-repo",
"aptly repo add local-repo ${files}",
"aptly publish repo -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=maverick local-repo",
"aptly repo remove local-repo Name",
"aptly repo add local-repo ${testfiles}",
]
runCmd = "aptly publish update -force-overwrite -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec maverick"
gold_processor = BaseTest.expand_environ
def check(self):
super(PublishUpdate10Test, self).check()
self.check_file_contents("public/pool/main/p/pyspi/pyspi_0.6.1.orig.tar.gz", "file")