Merge "tempest: Use primary user token"

This commit is contained in:
Jenkins 2017-07-17 11:19:00 +00:00 committed by Gerrit Code Review
commit ef21d748dd
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
defaults:
request_headers:
x-auth-token: $ENVIRON['ADMIN_TOKEN']
x-auth-token: $ENVIRON['USER_TOKEN']
tests:
- name: list alarms none

View File

@ -77,12 +77,14 @@ class TestTelemetryIntegration(manager.ScenarioTest):
return endpoints[0]['endpoints'][0][endpoint_type]
def _do_test(self, filename):
auth = self.os_admin.auth_provider.get_auth()
admin_auth = self.os_admin.auth_provider.get_auth()
auth = self.os_primary.auth_provider.get_auth()
networks = self.os_primary.networks_client.list_networks(
**{'router:external': False, 'fields': 'id'})['networks']
os.environ.update({
"ADMIN_TOKEN": auth[0],
"ADMIN_TOKEN": admin_auth[0],
"USER_TOKEN": auth[0],
"AODH_GRANULARITY": str(config.CONF.telemetry.alarm_granularity),
"AODH_SERVICE_URL": self._get_endpoint(auth, "alarming_plugin"),
"GNOCCHI_SERVICE_URL": self._get_endpoint(auth, "metric"),