Skip the test_get_service_by_host_name
This patch skips the test_get_service_by_host_name to get cinder
changes merged [1]. String for host could include host@backend info.
The service cinder-volume has got the info for host in this format and
therefore it is missing in the service list.
[1] I21775106693176ca128dbfd9db0d43cfc58de00a
Related-Bug: #1530144
Change-Id: I4044ab15078ecf54447e1c6e67c27fc8d7c9d6f7
diff --git a/tempest/api/volume/admin/test_volume_services.py b/tempest/api/volume/admin/test_volume_services.py
index 2b7ee45..fb42633 100644
--- a/tempest/api/volume/admin/test_volume_services.py
+++ b/tempest/api/volume/admin/test_volume_services.py
@@ -13,10 +13,16 @@
# License for the specific language governing permissions and limitations
# under the License.
+from tempest_lib import decorators
+
from tempest.api.volume import base
+from tempest import config
from tempest import test
+CONF = config.CONF
+
+
class VolumesServicesV2TestJSON(base.BaseVolumeAdminTest):
"""Tests Volume Services API.
@@ -45,10 +51,16 @@
for service in services:
self.assertEqual(self.binary_name, service['binary'])
+ @decorators.skip_because(bug="1530144")
@test.idempotent_id('178710e4-7596-4e08-9333-745cb8bc4f8d')
def test_get_service_by_host_name(self):
+ def get_host(host):
+ if CONF.volume_feature_enabled.volume_services:
+ host = host.split('@')[0]
+ return host
+
services_on_host = [service for service in self.services if
- service['host'] == self.host_name]
+ get_host(service['host']) == self.host_name]
services = (self.admin_volume_services_client.list_services(
host=self.host_name)['services'])
diff --git a/tempest/config.py b/tempest/config.py
index 92123b9..43e715f 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -788,7 +788,11 @@
default=True,
help='Update bootable status of a volume '
'Not implemented on icehouse ',
- deprecated_for_removal=True)
+ deprecated_for_removal=True),
+ # TODO(ynesenenko): Remove volume_services once liberty-eol happens.
+ cfg.BoolOpt('volume_services',
+ default=False,
+ help='Extract correct host info from host@backend')
]