test config dtypes
This commit is contained in:
parent
a7d7d9c1f5
commit
eb9ada8eb5
2 changed files with 13 additions and 9 deletions
|
|
@ -503,14 +503,14 @@ config_map = [
|
||||||
['MaxRepoTasksMaven', 'integer', 2],
|
['MaxRepoTasksMaven', 'integer', 2],
|
||||||
['RepoRetries', 'integer', 3],
|
['RepoRetries', 'integer', 3],
|
||||||
['RequestCleanTime', 'integer', 60 * 24], # in minutes
|
['RequestCleanTime', 'integer', 60 * 24], # in minutes
|
||||||
['AllowNewRepo', 'bool', True],
|
['AllowNewRepo', 'boolean', True],
|
||||||
['RepoLag', 'int', 3600],
|
['RepoLag', 'integer', 3600],
|
||||||
['RepoAutoLag', 'int', 7200],
|
['RepoAutoLag', 'integer', 7200],
|
||||||
['RepoLagWindow', 'int', 600],
|
['RepoLagWindow', 'integer', 600],
|
||||||
['RepoQueueUser', 'str', 'kojira'],
|
['RepoQueueUser', 'string', 'kojira'],
|
||||||
['DebuginfoTags', 'str', ''],
|
['DebuginfoTags', 'string', ''],
|
||||||
['SourceTags', 'str', ''],
|
['SourceTags', 'string', ''],
|
||||||
['SeparateSourceTags', 'str', ''],
|
['SeparateSourceTags', 'string', ''],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,6 @@ class TestHubConfig(unittest.TestCase):
|
||||||
expected = 'Invalid data type badtype for BadOpt option'
|
expected = 'Invalid data type badtype for BadOpt option'
|
||||||
self.assertEqual(str(ex.exception), expected)
|
self.assertEqual(str(ex.exception), expected)
|
||||||
|
|
||||||
|
|
||||||
def test_policy(self):
|
def test_policy(self):
|
||||||
config = '''
|
config = '''
|
||||||
[policy]
|
[policy]
|
||||||
|
|
@ -99,5 +98,10 @@ channel =
|
||||||
|
|
||||||
kojixmlrpc.load_config(self.environ)
|
kojixmlrpc.load_config(self.environ)
|
||||||
|
|
||||||
|
def test_map(self):
|
||||||
|
for row in kojixmlrpc.config_map:
|
||||||
|
name, dtype, default = row
|
||||||
|
self.assertIn(dtype, ('integer', 'boolean', 'string'))
|
||||||
|
|
||||||
|
|
||||||
# the end
|
# the end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue