Extends base network admin test
This commit modifies the base Kuryr test so it can rely on the neutron base test functions. Change-Id: I4720630881e0086feedf6f8082f7ef54ee498e13
This commit is contained in:
parent
4e6f5f0fe6
commit
a5ce631362
@ -14,25 +14,23 @@
|
||||
|
||||
import kubernetes
|
||||
|
||||
from tempest.api.network import base
|
||||
from tempest import config
|
||||
import tempest.test
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
|
||||
class BaseKuryrTest(tempest.test.BaseTestCase):
|
||||
|
||||
credentials = ['primary']
|
||||
class BaseAdminKuryrTest(base.BaseAdminNetworkTest):
|
||||
|
||||
@classmethod
|
||||
def skip_checks(cls):
|
||||
super(BaseKuryrTest, cls).skip_checks()
|
||||
super(BaseAdminKuryrTest, cls).skip_checks()
|
||||
if not CONF.service_available.kuryr:
|
||||
raise cls.skipException('Kuryr support is required')
|
||||
|
||||
@classmethod
|
||||
def resource_setup(cls):
|
||||
super(BaseKuryrTest, cls).resource_setup()
|
||||
super(BaseAdminKuryrTest, cls).resource_setup()
|
||||
# TODO (dmellado): Config k8s client in a cleaner way
|
||||
kubernetes.config.load_kube_config()
|
||||
cls.k8s_client = kubernetes.client.CoreV1Api()
|
||||
|
@ -24,7 +24,7 @@ from tempest.lib import decorators
|
||||
|
||||
from kuryr_tempest_plugin.tests import base
|
||||
|
||||
class TestKuryr_tempest_plugin(base.BaseKuryrTest):
|
||||
class TestKuryr_tempest_plugin(base.BaseAdminKuryrTest):
|
||||
|
||||
@decorators.idempotent_id('14990abd-76b4-476e-add2-321437d8cec5')
|
||||
def test_something(self):
|
||||
|
@ -17,8 +17,12 @@ from tempest.lib import decorators
|
||||
|
||||
from kuryr_tempest_plugin.tests import base
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
class PodTest(base.BaseKuryrTest):
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class PodTest(base.BaseAdminKuryrTest):
|
||||
|
||||
def _list_pods(self):
|
||||
pods = self.k8s_client.list_pod_for_all_namespaces(watch=False)
|
||||
|
Loading…
Reference in New Issue
Block a user