From 73d57d05259847cb6b284ed464cd0d2ff18303db Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Tue, 25 Apr 2017 14:24:39 +0200 Subject: [PATCH] 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 --- .../tests/integration/gabbi/gabbits-live/autoscaling.yaml | 2 +- .../tests/tempest/scenario/test_telemetry_integration.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ceilometer/tests/integration/gabbi/gabbits-live/autoscaling.yaml b/ceilometer/tests/integration/gabbi/gabbits-live/autoscaling.yaml index 36709259..8eac9d08 100644 --- a/ceilometer/tests/integration/gabbi/gabbits-live/autoscaling.yaml +++ b/ceilometer/tests/integration/gabbi/gabbits-live/autoscaling.yaml @@ -1,6 +1,6 @@ defaults: request_headers: - x-auth-token: $ENVIRON['ADMIN_TOKEN'] + x-auth-token: $ENVIRON['USER_TOKEN'] tests: - name: list alarms none diff --git a/ceilometer/tests/tempest/scenario/test_telemetry_integration.py b/ceilometer/tests/tempest/scenario/test_telemetry_integration.py index aa4703ab..986f0936 100644 --- a/ceilometer/tests/tempest/scenario/test_telemetry_integration.py +++ b/ceilometer/tests/tempest/scenario/test_telemetry_integration.py @@ -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"),