mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-05 22:08:27 +00:00
Add -force-overwrite flag to publish update, switch, snapshot and repo commands. #90
Includes new and updated system tests.
This commit is contained in:
@@ -782,3 +782,43 @@ class PublishSnapshot32Test(BaseTest):
|
||||
runCmd = "aptly publish snapshot -component=main,contrib snap32.1"
|
||||
expectedCode = 2
|
||||
outputMatchPrepare = lambda _, s: "\n".join([l for l in s.split("\n") if l.startswith("ERROR")])
|
||||
|
||||
|
||||
class PublishSnapshot33Test(BaseTest):
|
||||
"""
|
||||
publish snapshot: conflicting files in the snapshot
|
||||
"""
|
||||
fixtureCmds = [
|
||||
"aptly repo create local-repo1",
|
||||
"aptly repo add local-repo1 ${files}",
|
||||
"aptly snapshot create snap1 from repo local-repo1",
|
||||
"aptly repo create local-repo2",
|
||||
"aptly repo add local-repo2 ${testfiles}",
|
||||
"aptly snapshot create snap2 from repo local-repo2",
|
||||
"aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=maverick snap1",
|
||||
]
|
||||
runCmd = "aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=squeeze snap2"
|
||||
expectedCode = 1
|
||||
gold_processor = BaseTest.expand_environ
|
||||
|
||||
|
||||
class PublishSnapshot34Test(BaseTest):
|
||||
"""
|
||||
publish snapshot: -force-overwrite
|
||||
"""
|
||||
fixtureCmds = [
|
||||
"aptly repo create local-repo1",
|
||||
"aptly repo add local-repo1 ${files}",
|
||||
"aptly snapshot create snap1 from repo local-repo1",
|
||||
"aptly repo create local-repo2",
|
||||
"aptly repo add local-repo2 ${testfiles}",
|
||||
"aptly snapshot create snap2 from repo local-repo2",
|
||||
"aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=maverick snap1",
|
||||
]
|
||||
runCmd = "aptly publish snapshot -force-overwrite -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=squeeze snap2"
|
||||
gold_processor = BaseTest.expand_environ
|
||||
|
||||
def check(self):
|
||||
super(PublishSnapshot34Test, self).check()
|
||||
|
||||
self.check_file_contents("public/pool/main/p/pyspi/pyspi_0.6.1.orig.tar.gz", "file")
|
||||
|
||||
Reference in New Issue
Block a user