mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Refactor system tests to live together in one package.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
ERROR: error loading config file /Users/smira/.aptly.conf: invalid character 's' looking for beginning of object key string
|
||||
@@ -1,15 +1,33 @@
|
||||
"""
|
||||
Test config file generation.
|
||||
Test config file
|
||||
"""
|
||||
|
||||
import os
|
||||
from lib import BaseTest
|
||||
|
||||
|
||||
class Test(BaseTest):
|
||||
class CreateConfigTest(BaseTest):
|
||||
"""
|
||||
new file is generated if missing
|
||||
"""
|
||||
runCmd = "aptly"
|
||||
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"
|
||||
expectedCode = 1
|
||||
|
||||
def prepare(self):
|
||||
self.prepare_remove_all()
|
||||
|
||||
f = open(os.path.join(os.environ["HOME"], ".aptly.conf"), "w")
|
||||
f.write("{some crap")
|
||||
f.close()
|
||||
|
||||
Reference in New Issue
Block a user