mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-31 04:30:44 +00:00
Support for per-repo uploader.json in aptly repo commands. #71
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import os
|
||||
import inspect
|
||||
from lib import BaseTest
|
||||
|
||||
|
||||
changesRemove = lambda _, s: s.replace(os.path.join(os.path.dirname(inspect.getsourcefile(BaseTest)), "changes"), "")
|
||||
|
||||
|
||||
class CreateRepo1Test(BaseTest):
|
||||
"""
|
||||
create local repo: regular repo
|
||||
@@ -30,3 +35,31 @@ class CreateRepo3Test(BaseTest):
|
||||
fixtureCmds = ["aptly repo create repo3"]
|
||||
runCmd = "aptly repo create -comment=Repository3 repo3"
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
class CreateRepo4Test(BaseTest):
|
||||
"""
|
||||
create local repo: with uploaders.json
|
||||
"""
|
||||
runCmd = "aptly repo create -uploaders-file=${changes}/uploaders2.json repo4"
|
||||
|
||||
def check(self):
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly repo show repo4", "repo_show")
|
||||
|
||||
|
||||
class CreateRepo5Test(BaseTest):
|
||||
"""
|
||||
create local repo: with broken uploaders.json
|
||||
"""
|
||||
runCmd = "aptly repo create -uploaders-file=${changes}/uploaders3.json repo5"
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
class CreateRepo6Test(BaseTest):
|
||||
"""
|
||||
create local repo: with missing uploaders.json
|
||||
"""
|
||||
runCmd = "aptly repo create -uploaders-file=${changes}/uploaders-not-found.json repo6"
|
||||
expectedCode = 1
|
||||
outputMatchPrepare = changesRemove
|
||||
|
||||
Reference in New Issue
Block a user