mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +00:00
Tests for config in other file.
This commit is contained in:
19
system/t02_config/ConfigInFileTest_gold
Normal file
19
system/t02_config/ConfigInFileTest_gold
Normal 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
|
||||
1
system/t02_config/ConfigInMissingFileTest_gold
Normal file
1
system/t02_config/ConfigInMissingFileTest_gold
Normal file
@@ -0,0 +1 @@
|
||||
ERROR: open nosuchfile.conf: no such file or directory
|
||||
@@ -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
|
||||
|
||||
10
system/t02_config/aptly.conf
Normal file
10
system/t02_config/aptly.conf
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"rootDir": "${HOME}/.aptly",
|
||||
"downloadConcurrency": 4,
|
||||
"architectures": [],
|
||||
"dependencyFollowSuggests": false,
|
||||
"dependencyFollowRecommends": false,
|
||||
"dependencyFollowAllVariants": false,
|
||||
"gpgDisableSign": false,
|
||||
"gpgDisableVerify": false
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user