Fix for ceph_test on multi backend ceph

Skip cinder_endpoint test for edge podtype

Change-Id: Ifd8556fb9530e178b9781518b6b5562994ccc8ca
This commit is contained in:
Sawan Choudhary 2018-12-13 16:27:49 +00:00
parent 40e03ab095
commit f08840161b
2 changed files with 16 additions and 1 deletions

View File

@ -44,6 +44,12 @@ TESTS_OPTS = [
help='Run all endpoint tests in interval')
]
POD_TESTS_OPTS = [
cfg.StrOpt('podtype',
default='',
help='Mgmt PODTYPE')
]
CONF = cfg.CONF
periodic_test_group = cfg.OptGroup(name='periodic_tests',
@ -51,6 +57,11 @@ periodic_test_group = cfg.OptGroup(name='periodic_tests',
CONF.register_group(periodic_test_group)
CONF.register_opts(TESTS_OPTS, periodic_test_group)
pod_type_test_group = cfg.OptGroup(name='pod_type',
title='Mgmt POD Type')
CONF.register_group(pod_type_test_group)
CONF.register_opts(POD_TESTS_OPTS, pod_type_test_group)
class endpoint_scenario(base.Scenario):
@ -88,6 +99,10 @@ class endpoint_scenario(base.Scenario):
@base.scenario(admin_only=False, operator=False)
def cinder_endpoint(self, *args, **kwargs):
podtype = cfg.CONF.pod_type.podtype
if podtype.lower() == "edge":
skip_msg = "cinder_endpoint test not supported for PODTYPE: edge"
return (300, skip_msg, [])
creds = self._get_keystone_session_creds()
cinder = CinderHealth(creds)
return cinder.cinder_list()

View File

@ -277,7 +277,7 @@ class operator_scenario(base.Scenario):
cmd = (r"ceph -f json status")
is_containerized = cfg.CONF.operator_test.containerized
if is_containerized:
ceph_container = get_container_name("ceph")
ceph_container = get_container_name("cephmon")
cmd = ("'docker exec %s %s'" % (ceph_container, cmd))
anscmd = "ansible -o all -i 127.0.0.1, -a "
cmd = anscmd + cmd + ' -u root'