Tests for config in other file.

This commit is contained in:
Andrey Smirnov
2014-02-07 20:00:43 +04:00
parent 803570bf26
commit 14e66c03a6
6 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
aptly - Debian repository management tool
Commands:
mirror manage mirrors of remote repositories
publish manage published repositories
serve start embedded HTTP server to serve published repositories
snapshot manage snapshots of repositories
version display version
Use "aptly help <command>" for more information about a command.
Options:
-architectures="": list of architectures to consider during (comma-separated), default to all available
-config="": location of configuration file (default locations are /etc/aptly.conf, ~/.aptly.conf)
-dep-follow-all-variants=false: when processing dependencies, follow a & b if depdency is 'a|b'
-dep-follow-recommends=false: when processing dependencies, follow Recommends
-dep-follow-suggests=false: when processing dependencies, follow Suggests

View File

@@ -0,0 +1 @@
ERROR: open nosuchfile.conf: no such file or directory

View File

@@ -3,6 +3,7 @@ Test config file
"""
import os
import inspect
from lib import BaseTest
@@ -33,3 +34,20 @@ class BadConfigTest(BaseTest):
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", "-config=%s" % (os.path.join(os.path.dirname(inspect.getsourcefile(BadConfigTest)), "aptly.conf"), )]
prepare = BaseTest.prepare_remove_all
class ConfigInMissingFileTest(BaseTest):
"""
config in other file test
"""
runCmd = ["aptly", "-config=nosuchfile.conf"]
expectedCode = 1
prepare = BaseTest.prepare_remove_all

View File

@@ -0,0 +1,10 @@
{
"rootDir": "${HOME}/.aptly",
"downloadConcurrency": 4,
"architectures": [],
"dependencyFollowSuggests": false,
"dependencyFollowRecommends": false,
"dependencyFollowAllVariants": false,
"gpgDisableSign": false,
"gpgDisableVerify": false
}

View File

@@ -4,6 +4,7 @@ take snapshots and publish them back as Debian repositories.
Options:
-architectures="": list of architectures to consider during (comma-separated), default to all available
-config="": location of configuration file (default locations are /etc/aptly.conf, ~/.aptly.conf)
-dep-follow-all-variants=false: when processing dependencies, follow a & b if depdency is 'a|b'
-dep-follow-recommends=false: when processing dependencies, follow Recommends
-dep-follow-suggests=false: when processing dependencies, follow Suggests

View File

@@ -13,6 +13,7 @@ Use "aptly help <command>" for more information about a command.
Options:
-architectures="": list of architectures to consider during (comma-separated), default to all available
-config="": location of configuration file (default locations are /etc/aptly.conf, ~/.aptly.conf)
-dep-follow-all-variants=false: when processing dependencies, follow a & b if depdency is 'a|b'
-dep-follow-recommends=false: when processing dependencies, follow Recommends
-dep-follow-suggests=false: when processing dependencies, follow Suggests