deb-keystone/run_tests.py
Yuriy Taraday eb803079d6 Moved run_test logic into abstract class.
Useful for testing in some custom environment, e.g. during backend writing.
Example using of new class is at http://paste.openstack.org/show/2180/.
This script runs all unittests with the real LDAP connection.
The config template is at http://paste.openstack.org/show/2181/.

Change-Id: I4d89e8c4e9458cd982d73dd973d2da63989f4c93
2011-08-16 09:44:07 -05:00

32 lines
749 B
Python
Executable File

#!/usr/bin/env python
"""Manages execution of keystone test suites"""
from keystone.test import KeystoneTest
class SQLTest(KeystoneTest):
config_name = 'sql.conf.template'
test_files = ('keystone.db',)
class MemcacheTest(KeystoneTest):
config_name = 'memcache.conf.template'
test_files = ('keystone.db',)
class LDAPTest(KeystoneTest):
config_name = 'ldap.conf.template'
test_files = ('keystone.db', 'ldap.db', 'ldap.db.db',)
TESTS = [
SQLTest,
# not running MemcacheTest,
LDAPTest,
]
if __name__ == '__main__':
for test_num, test_cls in enumerate(TESTS):
print 'Starting test %d of %d with config: %s' % \
(test_num + 1, len(TESTS), test_cls.config_name)
test_cls().run()