Skip to content

Commit

Permalink
Skip the test_get_service_by_host_name
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nya17y committed Feb 15, 2016
1 parent 3043f13 commit 86d90f2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
14 changes: 13 additions & 1 deletion tempest/api/volume/admin/test_volume_services.py
Expand Up @@ -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.
Expand Down Expand Up @@ -45,10 +51,16 @@ def test_get_service_by_service_binary_name(self):
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'])
Expand Down
6 changes: 5 additions & 1 deletion tempest/config.py
Expand Up @@ -788,7 +788,11 @@ def register_opt_group(conf, opt_group, options):
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')
]


Expand Down

0 comments on commit 86d90f2

Please sign in to comment.