tempest: Use primary user token

This change uses an non-admin user for the autoscaling tests.

This should avoid future bug like
https://bugs.launchpad.net/aodh/+bug/1703824

Change-Id: Ia8b5244aee9b6fedb9f205c32fef968e12061e37
This commit is contained in:
Mehdi Abaakouk 2017-04-25 14:24:39 +02:00
parent bc92f32bfa
commit 73d57d0525
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"),