Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Cloud:OpenStack:Pike
openstack-tempest
0001-Restrict-test_list_endpoints_for_token-to-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Restrict-test_list_endpoints_for_token-to-tempest.patch of Package openstack-tempest
From 60cb4b2576ba86fa5b7f1cdf0bb8d372039c26f3 Mon Sep 17 00:00:00 2001 From: "Andrea Frittoli (andreaf)" <andrea.frittoli@gmail.com> Date: Thu, 18 Jan 2018 10:11:35 +0000 Subject: [PATCH] Restrict test_list_endpoints_for_token to tempest The test_list_endpoints_for_token test now checks for services in service_available, however that may include services from plugins. We don't have a strong contract on the meaning of service_available so this is not correct as it will look in the catalog for things that may not even be OpenStack services. Fixing this by restricting by services in Tempest (including keystone). Change-Id: I32f4f056ea49fe04bfc309abe2cc9b9234b92847 Closes-bug: #1743996 --- tempest/api/identity/admin/v2/test_tokens.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tempest/api/identity/admin/v2/test_tokens.py b/tempest/api/identity/admin/v2/test_tokens.py index 6b30d23cc..6ce1a8be5 100644 --- a/tempest/api/identity/admin/v2/test_tokens.py +++ b/tempest/api/identity/admin/v2/test_tokens.py @@ -112,6 +112,8 @@ class TokensTestJSON(base.BaseIdentityV2AdminTest): @decorators.idempotent_id('ca3ea6f7-ed08-4a61-adbd-96906456ad31') def test_list_endpoints_for_token(self): + tempest_services = ['keystone', 'nova', 'neutron', 'swift', 'cinder', + 'neutron'] # get a token for the user creds = self.os_primary.credentials username = creds.username @@ -125,9 +127,10 @@ class TokensTestJSON(base.BaseIdentityV2AdminTest): self.assertIsInstance(endpoints, list) # Store list of service names service_names = [e['name'] for e in endpoints] - # Get the list of available services. + # Get the list of available services. Keystone is always available. available_services = [s[0] for s in list( - CONF.service_available.items()) if s[1] is True] + CONF.service_available.items()) if s[1] is True] + ['keystone'] # Verify that all available services are present. - for service in available_services: - self.assertIn(service, service_names) + for service in tempest_services: + if service in available_services: + self.assertIn(service, service_names) -- 2.16.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor