Skip integration tests when not configured

The new API tests have a load test method, which requires the heat
tempest plugin to be configured to load. This can be called by random
test suite that don't want to run our tests, so let's skip when it's not
configured.

Change-Id: I04024f288aaba5cbb3ada2a5b68d3f0bf56fcf4b
This commit is contained in:
Thomas Herve 2017-01-19 16:49:59 +01:00
parent 6eac8c8eee
commit a9db2634af

View File

@ -30,6 +30,9 @@ def load_tests(loader, tests, pattern):
test_dir = os.path.join(os.path.dirname(__file__), TESTS_DIR)
conf = config.CONF.heat_plugin
if conf.auth_url is None:
# It's not configured, let's not load tests
return
manager = clients.ClientManager(conf)
endpoint = manager.identity_client.get_endpoint_url(
'orchestration', conf.region)