diff options
author | Tim Simpson <tim.simpson@rackspace.com> | 2013-03-06 18:24:17 -0600 |
---|---|---|
committer | Tim Simpson <tim.simpson@rackspace.com> | 2013-03-06 18:24:17 -0600 |
commit | 0fc4600e014000e461861f02e4ce4520d7bf1d94 (patch) | |
tree | 41d54310dfd86de7027667c4074be9c66ec3b00f /run_tests.py | |
parent | dc0a82131d880b3ee3d20c5dd33bbf0d6970a83e (diff) | |
download | trove-0fc4600e014000e461861f02e4ce4520d7bf1d94.tar.gz |
Tests the API in XML mode.
This form of testing has been nearly available for awhile but was not
turned on because it will increase the time of a full tox test run by
eight seconds. However there has recently been new features which do
not work at all with XML, so the time loss seems like a silly reason
to not gate on this.
implements blueprint test-with-xml
Change-Id: I98d892bb5c1a0c16425f80a28a296c70120318c8
Diffstat (limited to 'run_tests.py')
-rw-r--r-- | run_tests.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/run_tests.py b/run_tests.py index 7e7fdbe7..df33be8c 100644 --- a/run_tests.py +++ b/run_tests.py @@ -89,6 +89,16 @@ def initialize_fakes(app): time.sleep = event_simulator_sleep +def parse_args_for_test_config(): + for index in range(len(sys.argv)): + arg = sys.argv[index] + print(arg) + if arg[:14] == "--test-config=": + del sys.argv[index] + return arg[14:] + return 'etc/tests/localhost.test.conf' + + def replace_poll_until(): from reddwarf.common import utils as rd_utils from reddwarf.tests import util as test_utils @@ -109,7 +119,8 @@ if __name__ == "__main__": # 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') + test_config_file = parse_args_for_test_config() + CONFIG.load_from_file(test_config_file) from reddwarf.tests.api import limits from reddwarf.tests.api import flavors |