mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-21 12:57:40 +00:00
Imported Upstream version 1.0.1
This commit is contained in:
@@ -0,0 +1 @@
|
||||
ERROR: error loading config file ${HOME}/.aptly.conf: invalid character 's' looking for beginning of object key string
|
||||
@@ -0,0 +1 @@
|
||||
No mirrors found, create one with `aptly mirror create ...`.
|
||||
@@ -0,0 +1 @@
|
||||
ERROR: open nosuchfile.conf: no such file or directory
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"rootDir": "${HOME}/.aptly",
|
||||
"downloadConcurrency": 4,
|
||||
"downloadSpeedLimit": 0,
|
||||
"architectures": [],
|
||||
"dependencyFollowSuggests": false,
|
||||
"dependencyFollowRecommends": false,
|
||||
"dependencyFollowAllVariants": false,
|
||||
"dependencyFollowSource": false,
|
||||
"gpgDisableSign": false,
|
||||
"gpgDisableVerify": false,
|
||||
"downloadSourcePackages": false,
|
||||
"ppaDistributorID": "ubuntu",
|
||||
"ppaCodename": "",
|
||||
"skipContentsPublishing": false,
|
||||
"S3PublishEndpoints": {},
|
||||
"SwiftPublishEndpoints": {}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"rootDir": "${HOME}/.aptly",
|
||||
"downloadConcurrency": 4,
|
||||
"downloadSpeedLimit": 0,
|
||||
"architectures": [],
|
||||
"dependencyFollowSuggests": false,
|
||||
"dependencyFollowRecommends": false,
|
||||
"dependencyFollowAllVariants": false,
|
||||
"dependencyFollowSource": false,
|
||||
"gpgDisableSign": false,
|
||||
"gpgDisableVerify": false,
|
||||
"downloadSourcePackages": false,
|
||||
"ppaDistributorID": "ubuntu",
|
||||
"ppaCodename": "",
|
||||
"skipContentsPublishing": false,
|
||||
"S3PublishEndpoints": {},
|
||||
"SwiftPublishEndpoints": {}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
"""
|
||||
Test config file
|
||||
"""
|
||||
|
||||
import os
|
||||
import re
|
||||
import inspect
|
||||
from lib import BaseTest
|
||||
|
||||
|
||||
class CreateConfigTest(BaseTest):
|
||||
"""
|
||||
new file is generated if missing
|
||||
"""
|
||||
runCmd = "aptly mirror list"
|
||||
checkedFile = os.path.join(os.environ["HOME"], ".aptly.conf")
|
||||
|
||||
check = BaseTest.check_file
|
||||
gold_processor = BaseTest.expand_environ
|
||||
prepare = BaseTest.prepare_remove_all
|
||||
|
||||
|
||||
class BadConfigTest(BaseTest):
|
||||
"""
|
||||
broken config file
|
||||
"""
|
||||
runCmd = "aptly mirror list"
|
||||
expectedCode = 1
|
||||
|
||||
gold_processor = BaseTest.expand_environ
|
||||
|
||||
def prepare(self):
|
||||
self.prepare_remove_all()
|
||||
|
||||
f = open(os.path.join(os.environ["HOME"], ".aptly.conf"), "w")
|
||||
f.write("{some crap")
|
||||
f.close()
|
||||
|
||||
|
||||
class ConfigInFileTest(BaseTest):
|
||||
"""
|
||||
config in other file test
|
||||
"""
|
||||
runCmd = ["aptly", "mirror", "list",
|
||||
"-config=%s" % (os.path.join(os.path.dirname(inspect.getsourcefile(BadConfigTest)), "aptly.conf"), )]
|
||||
prepare = BaseTest.prepare_remove_all
|
||||
|
||||
outputMatchPrepare = lambda _, s: re.sub(r' -(cpuprofile|memprofile|memstats|meminterval)=.*\n', '', s, flags=re.MULTILINE)
|
||||
|
||||
|
||||
class ConfigInMissingFileTest(BaseTest):
|
||||
"""
|
||||
config in other file test
|
||||
"""
|
||||
runCmd = ["aptly", "mirror", "list", "-config=nosuchfile.conf"]
|
||||
expectedCode = 1
|
||||
prepare = BaseTest.prepare_remove_all
|
||||
|
||||
|
||||
class ConfigShowTest(BaseTest):
|
||||
"""
|
||||
config showing
|
||||
"""
|
||||
runCmd = ["aptly", "config", "show"]
|
||||
gold_processor = BaseTest.expand_environ
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"rootDir": "/tmp/aptly",
|
||||
"downloadConcurrency": 4,
|
||||
"architectures": [],
|
||||
"dependencyFollowSuggests": false,
|
||||
"dependencyFollowRecommends": false,
|
||||
"dependencyFollowAllVariants": false,
|
||||
"gpgDisableSign": false,
|
||||
"gpgDisableVerify": false
|
||||
}
|
||||
Reference in New Issue
Block a user