Last active
December 14, 2015 11:59
-
-
Save hub-cap/5083270 to your computer and use it in GitHub Desktop.
Update run_tests so it doesnt swallow msgs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if __name__=="__main__": | |
| - wsgi_install() | |
| - add_support_for_localization() | |
| - replace_poll_until() | |
| - # Load Reddwarf app | |
| - # Paste file needs absolute path | |
| - config_file = os.path.realpath('etc/reddwarf/reddwarf.conf.test') | |
| - # 'etc/reddwarf/test-api-paste.ini' | |
| - app = initialize_reddwarf(config_file) | |
| - # Initialize sqlite database. | |
| - initialize_database() | |
| - # Swap out WSGI, httplib, and several sleep functions with test doubles. | |
| - initialize_fakes(app) | |
| - # Initialize the test configuration. | |
| - CONFIG.load_from_file('etc/tests/localhost.test.conf') | |
| - | |
| - from reddwarf.tests.api import flavors | |
| - from reddwarf.tests.api import versions | |
| - from reddwarf.tests.api import versions | |
| - from reddwarf.tests.api import instances | |
| - from reddwarf.tests.api import instances_actions | |
| - from reddwarf.tests.api import instances_delete | |
| - from reddwarf.tests.api import instances_mysql_down | |
| - from reddwarf.tests.api import instances_resize | |
| - from reddwarf.tests.api import databases | |
| - from reddwarf.tests.api import root | |
| - from reddwarf.tests.api import users | |
| - from reddwarf.tests.api import user_access | |
| - from reddwarf.tests.api.mgmt import accounts | |
| - from reddwarf.tests.api.mgmt import admin_required | |
| - from reddwarf.tests.api.mgmt import instances | |
| - from reddwarf.tests.api.mgmt import instances_actions | |
| - from reddwarf.tests.api.mgmt import storage | |
| + try: | |
| + wsgi_install() | |
| + add_support_for_localization() | |
| + replace_poll_until() | |
| + # Load Reddwarf app | |
| + # Paste file needs absolute path | |
| + config_file = os.path.realpath('etc/reddwarf/reddwarf.conf.test') | |
| + # 'etc/reddwarf/test-api-paste.ini' | |
| + app = initialize_reddwarf(config_file) | |
| + # Initialize sqlite database. | |
| + initialize_database() | |
| + # Swap out WSGI, httplib, and several sleep functions with test doubles. | |
| + initialize_fakes(app) | |
| + # Initialize the test configuration. | |
| + CONFIG.load_from_file('etc/tests/localhost.test.conf') | |
| + | |
| + from reddwarf.tests.api import flavors | |
| + from reddwarf.tests.api import versions | |
| + from reddwarf.tests.api import instances | |
| + from reddwarf.tests.api import instances_actions | |
| + from reddwarf.tests.api import instances_delete | |
| + from reddwarf.tests.api import instances_mysql_down | |
| + from reddwarf.tests.api import instances_resize | |
| + from reddwarf.tests.api import databases | |
| + from reddwarf.tests.api import root | |
| + from reddwarf.tests.api import users | |
| + from reddwarf.tests.api import user_access | |
| + from reddwarf.tests.api.mgmt import accounts | |
| + from reddwarf.tests.api.mgmt import admin_required | |
| + from reddwarf.tests.api.mgmt import instances | |
| + from reddwarf.tests.api.mgmt import instances_actions | |
| + from reddwarf.tests.api.mgmt import storage | |
| + except Exception, e: | |
| + print "Run tests failed %s" % e.msg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment