Improve Tower integration test support:

- Add TOWER_VERSION environment variable.
- Add error check for missing configuration.
pull/37004/merge
Matt Clay 7 years ago
parent 70c0875dbc
commit 981e89117a

@ -205,6 +205,7 @@ class TowerConfig(object):
:rtype: dict[str, str]
"""
env = dict(
TOWER_VERSION=self.version,
TOWER_HOST=self.host,
TOWER_USERNAME=self.username,
TOWER_PASSWORD=self.password,
@ -231,6 +232,11 @@ class TowerConfig(object):
values = dict((k, parser.get('general', k)) for k in keys)
config = TowerConfig(values)
missing = [k for k in keys if not values.get(k)]
if missing:
raise ApplicationError('Missing or empty Tower configuration value(s): %s' % ', '.join(missing))
return config

Loading…
Cancel
Save