From fedc28905907d4056b513a09645b4b5bf922d8f9 Mon Sep 17 00:00:00 2001 From: Tetsuro Nakamura Date: Sat, 31 Aug 2019 13:33:09 +0000 Subject: [PATCH] Fix gate issue of placement unit test The commit b366634af80a3d400adf6e7bb9d2dded64e10d75 changed the placement client to add "region_name" to "endpoint filter", but the unit test has not been changed and started to raise failures on gate. This patch fixes the issue. Change-Id: I6acafaca389261ea76f064092b8c32bcfb4108e1 Related-Bug: #1836917 --- blazar/tests/utils/openstack/test_placement.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blazar/tests/utils/openstack/test_placement.py b/blazar/tests/utils/openstack/test_placement.py index 1b5741b5..ced2548d 100644 --- a/blazar/tests/utils/openstack/test_placement.py +++ b/blazar/tests/utils/openstack/test_placement.py @@ -35,6 +35,7 @@ class TestPlacementClient(tests.TestCase): self.cfg.config(os_auth_port='8080') self.cfg.config(os_auth_prefix='identity') self.cfg.config(os_auth_version='v3') + self.cfg.config(os_region_name='region_foo') self.client = placement.BlazarPlacementClient() def test_client_auth_url(self): @@ -43,7 +44,8 @@ class TestPlacementClient(tests.TestCase): def _add_default_kwargs(self, kwargs): kwargs['endpoint_filter'] = {'service_type': 'placement', - 'interface': 'public'} + 'interface': 'public', + 'region_name': 'region_foo'} kwargs['headers'] = {'accept': 'application/json'} kwargs['microversion'] = PLACEMENT_MICROVERSION kwargs['raise_exc'] = False