mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-05 22:08:27 +00:00
Tests for config in other file.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user