summaryrefslogtreecommitdiffstats
path: root/tests/functional/common
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/common')
-rw-r--r--tests/functional/common/arbiter/test_arbiter.py9
-rw-r--r--tests/functional/common/gluster_block/test_restart_gluster_block.py3
-rw-r--r--tests/functional/common/gluster_stability/test_gluster_services_restart.py16
-rw-r--r--tests/functional/common/provisioning/test_dynamic_provisioning_block_p0_cases.py12
-rw-r--r--tests/functional/common/provisioning/test_dynamic_provisioning_p0_cases.py12
-rw-r--r--tests/functional/common/provisioning/test_pv_resize.py4
-rw-r--r--tests/functional/common/provisioning/test_storage_class_cases.py10
-rw-r--r--tests/functional/common/test_node_restart.py4
8 files changed, 32 insertions, 38 deletions
diff --git a/tests/functional/common/arbiter/test_arbiter.py b/tests/functional/common/arbiter/test_arbiter.py
index c445103f..4a0853b3 100644
--- a/tests/functional/common/arbiter/test_arbiter.py
+++ b/tests/functional/common/arbiter/test_arbiter.py
@@ -17,20 +17,15 @@ from cnslibs.common.openshift_ops import (
@ddt.ddt
-class TestArbiterVolumeCreateExpandDelete(cns_baseclass.CnsBaseClass):
+class TestArbiterVolumeCreateExpandDelete(cns_baseclass.BaseClass):
def setUp(self):
super(TestArbiterVolumeCreateExpandDelete, self).setUp()
-
self.node = self.ocp_master_node[0]
- self.sc = self.cns_storage_class.get(
- 'storage_class1', self.cns_storage_class.get('file_storage_class'))
# Mark one of the Heketi nodes as arbiter-supported if none of
# existent nodes or devices already enabled to support it.
- self.heketi_server_url = self.cns_storage_class.get(
- 'storage_class1',
- self.cns_storage_class.get('file_storage_class'))['resturl']
+ self.heketi_server_url = self.sc.get('resturl')
arbiter_tags = ('required', 'supported')
arbiter_already_supported = False
diff --git a/tests/functional/common/gluster_block/test_restart_gluster_block.py b/tests/functional/common/gluster_block/test_restart_gluster_block.py
index aa2b1e62..b2d74d92 100644
--- a/tests/functional/common/gluster_block/test_restart_gluster_block.py
+++ b/tests/functional/common/gluster_block/test_restart_gluster_block.py
@@ -23,9 +23,8 @@ class TestRestartGlusterBlockPod(HeketiBaseClass):
self.addCleanup(heketi_blockvolume_delete, self.heketi_client_node,
self.heketi_server_url, vol_info['id'])
- dc_name = ("glusterblock-%s-provisioner-dc"
- % self.cns_project_name)
# restart gluster-block-provisioner-pod
+ dc_name = "glusterblock-%s-provisioner-dc" % self.storage_project_name
pod_name = get_pod_name_from_dc(self.ocp_master_node, dc_name)
oc_delete(self.ocp_master_node, 'pod', pod_name)
wait_for_resource_absence(self.ocp_master_node, 'pod', pod_name)
diff --git a/tests/functional/common/gluster_stability/test_gluster_services_restart.py b/tests/functional/common/gluster_stability/test_gluster_services_restart.py
index 82511900..db80b6a4 100644
--- a/tests/functional/common/gluster_stability/test_gluster_services_restart.py
+++ b/tests/functional/common/gluster_stability/test_gluster_services_restart.py
@@ -34,7 +34,7 @@ from cnslibs.common.gluster_ops import (
restart_brick_process,
wait_to_heal_complete
)
-from cnslibs.cns.cns_baseclass import CnsBaseClass
+from cnslibs.cns.cns_baseclass import BaseClass
from cnslibs.common import podcmd
HEKETI_BLOCK_VOLUME_REGEX = "^Id:(.*).Cluster:(.*).Name:%s_(.*)$"
@@ -45,7 +45,7 @@ SERVICE_TCMU = "tcmu-runner"
@ddt.ddt
-class GlusterStabilityTestSetup(CnsBaseClass):
+class GlusterStabilityTestSetup(BaseClass):
"""class for gluster stability (restarts different servces) testcases
TC No's: CNS-1393, CNS-1394, CNS-1395
"""
@@ -62,13 +62,13 @@ class GlusterStabilityTestSetup(CnsBaseClass):
# which uses time and date of test case
self.prefix = "autotest-%s" % (self.glustotest_run_id.replace("_", ""))
- _cns_storage_class = self.cns_storage_class.get(
+ _storage_class = self.storage_classes.get(
'storage_class2',
- self.cns_storage_class.get('block_storage_class'))
- self.provisioner = _cns_storage_class["provisioner"]
- self.restsecretnamespace = _cns_storage_class["restsecretnamespace"]
- self.restuser = _cns_storage_class["restuser"]
- self.resturl = _cns_storage_class["resturl"]
+ self.storage_classes.get('block_storage_class'))
+ self.provisioner = _storage_class["provisioner"]
+ self.restsecretnamespace = _storage_class["restsecretnamespace"]
+ self.restuser = _storage_class["restuser"]
+ self.resturl = _storage_class["resturl"]
# using pvc size count as 1 by default
self.pvcsize = 1
diff --git a/tests/functional/common/provisioning/test_dynamic_provisioning_block_p0_cases.py b/tests/functional/common/provisioning/test_dynamic_provisioning_block_p0_cases.py
index 5edbdc50..11edf4ba 100644
--- a/tests/functional/common/provisioning/test_dynamic_provisioning_block_p0_cases.py
+++ b/tests/functional/common/provisioning/test_dynamic_provisioning_block_p0_cases.py
@@ -1,7 +1,7 @@
import time
from unittest import skip
-from cnslibs.cns.cns_baseclass import CnsGlusterBlockBaseClass
+from cnslibs.cns.cns_baseclass import GlusterBlockBaseClass
from cnslibs.common.exceptions import ExecutionError
from cnslibs.common.openshift_ops import (
get_gluster_pod_names_by_pvc_name,
@@ -25,7 +25,7 @@ from cnslibs.common.waiter import Waiter
from glusto.core import Glusto as g
-class TestDynamicProvisioningBlockP0(CnsGlusterBlockBaseClass):
+class TestDynamicProvisioningBlockP0(GlusterBlockBaseClass):
'''
Class that contain P0 dynamic provisioning test cases
for block volume
@@ -84,9 +84,9 @@ class TestDynamicProvisioningBlockP0(CnsGlusterBlockBaseClass):
# Remove Heketi pod
heketi_down_cmd = "oc scale --replicas=0 dc/%s --namespace %s" % (
- self.heketi_dc_name, self.cns_project_name)
+ self.heketi_dc_name, self.storage_project_name)
heketi_up_cmd = "oc scale --replicas=1 dc/%s --namespace %s" % (
- self.heketi_dc_name, self.cns_project_name)
+ self.heketi_dc_name, self.storage_project_name)
self.addCleanup(self.cmd_run, heketi_up_cmd)
heketi_pod_name = get_pod_name_from_dc(
self.node, self.heketi_dc_name, timeout=10, wait_step=3)
@@ -228,7 +228,7 @@ class TestDynamicProvisioningBlockP0(CnsGlusterBlockBaseClass):
scale_dc_pod_amount_and_wait(self.ocp_client[0],
self.heketi_dc_name,
0,
- self.cns_project_name)
+ self.storage_project_name)
try:
# delete pvc
for pvc in self.pvc_name_list:
@@ -243,7 +243,7 @@ class TestDynamicProvisioningBlockP0(CnsGlusterBlockBaseClass):
scale_dc_pod_amount_and_wait(self.ocp_client[0],
self.heketi_dc_name,
1,
- self.cns_project_name)
+ self.storage_project_name)
# verify PVC's are deleted
for pvc in self.pvc_name_list:
diff --git a/tests/functional/common/provisioning/test_dynamic_provisioning_p0_cases.py b/tests/functional/common/provisioning/test_dynamic_provisioning_p0_cases.py
index ebc33665..07be5e53 100644
--- a/tests/functional/common/provisioning/test_dynamic_provisioning_p0_cases.py
+++ b/tests/functional/common/provisioning/test_dynamic_provisioning_p0_cases.py
@@ -1,7 +1,7 @@
import time
from unittest import skip
-from cnslibs.cns.cns_baseclass import CnsBaseClass
+from cnslibs.cns.cns_baseclass import BaseClass
from cnslibs.common.exceptions import ExecutionError
from cnslibs.common.heketi_ops import (
verify_volume_name_prefix)
@@ -31,7 +31,7 @@ from cnslibs.common.waiter import Waiter
from glusto.core import Glusto as g
-class TestDynamicProvisioningP0(CnsBaseClass):
+class TestDynamicProvisioningP0(BaseClass):
'''
Class that contain P0 dynamic provisioning test cases for
glusterfile volume
@@ -116,9 +116,9 @@ class TestDynamicProvisioningP0(CnsBaseClass):
# Remove Heketi pod
heketi_down_cmd = "oc scale --replicas=0 dc/%s --namespace %s" % (
- self.heketi_dc_name, self.cns_project_name)
+ self.heketi_dc_name, self.storage_project_name)
heketi_up_cmd = "oc scale --replicas=1 dc/%s --namespace %s" % (
- self.heketi_dc_name, self.cns_project_name)
+ self.heketi_dc_name, self.storage_project_name)
self.addCleanup(self.cmd_run, heketi_up_cmd)
heketi_pod_name = get_pod_name_from_dc(
self.node, self.heketi_dc_name, timeout=10, wait_step=3)
@@ -281,7 +281,7 @@ class TestDynamicProvisioningP0(CnsBaseClass):
scale_dc_pod_amount_and_wait(self.ocp_client[0],
self.heketi_dc_name,
0,
- self.cns_project_name)
+ self.storage_project_name)
try:
# delete pvc
for pvc in self.pvc_name_list:
@@ -296,7 +296,7 @@ class TestDynamicProvisioningP0(CnsBaseClass):
scale_dc_pod_amount_and_wait(self.ocp_client[0],
self.heketi_dc_name,
1,
- self.cns_project_name)
+ self.storage_project_name)
# verify PVC's are deleted
for pvc in self.pvc_name_list:
diff --git a/tests/functional/common/provisioning/test_pv_resize.py b/tests/functional/common/provisioning/test_pv_resize.py
index 41f5e113..52a5915f 100644
--- a/tests/functional/common/provisioning/test_pv_resize.py
+++ b/tests/functional/common/provisioning/test_pv_resize.py
@@ -16,13 +16,13 @@ from cnslibs.common.openshift_ops import (
wait_for_pod_be_ready,
wait_for_resource_absence)
from cnslibs.common.openshift_version import get_openshift_version
-from cnslibs.cns.cns_baseclass import CnsBaseClass
+from cnslibs.cns.cns_baseclass import BaseClass
from cnslibs.common.exceptions import ExecutionError
from glusto.core import Glusto as g
@ddt.ddt
-class TestPvResizeClass(CnsBaseClass):
+class TestPvResizeClass(BaseClass):
"""Test cases for PV resize."""
@classmethod
diff --git a/tests/functional/common/provisioning/test_storage_class_cases.py b/tests/functional/common/provisioning/test_storage_class_cases.py
index 027bd0f2..8fd001dd 100644
--- a/tests/functional/common/provisioning/test_storage_class_cases.py
+++ b/tests/functional/common/provisioning/test_storage_class_cases.py
@@ -22,7 +22,7 @@ from cnslibs.common.openshift_ops import (
@ddt.ddt
-class TestStorageClassCases(cns_baseclass.CnsBaseClass):
+class TestStorageClassCases(cns_baseclass.BaseClass):
def create_sc_with_parameter(self, vol_type, success=False, parameter={}):
"""creates storage class, pvc and validates event
@@ -34,9 +34,9 @@ class TestStorageClassCases(cns_baseclass.CnsBaseClass):
parameter (dict): dictionary with storage class parameters
"""
if vol_type == "glusterfile":
- sc = self.cns_storage_class.get(
+ sc = self.storage_classes.get(
'storage_class1',
- self.cns_storage_class.get('file_storage_class'))
+ self.storage_classes.get('file_storage_class'))
# Create secret file for usage in storage class
self.secret_name = oc_create_secret(
@@ -52,9 +52,9 @@ class TestStorageClassCases(cns_baseclass.CnsBaseClass):
"volumetype": "replicate:3"
}
elif vol_type == "glusterblock":
- sc = self.cns_storage_class.get(
+ sc = self.storage_classes.get(
'storage_class2',
- self.cns_storage_class.get('block_storage_class'))
+ self.storage_classes.get('block_storage_class'))
# Create secret file for usage in storage class
self.secret_name = oc_create_secret(
diff --git a/tests/functional/common/test_node_restart.py b/tests/functional/common/test_node_restart.py
index 99f3ee67..02272321 100644
--- a/tests/functional/common/test_node_restart.py
+++ b/tests/functional/common/test_node_restart.py
@@ -2,7 +2,7 @@
import time
from unittest import skip
-from cnslibs.cns.cns_baseclass import CnsBaseClass
+from cnslibs.cns.cns_baseclass import BaseClass
from cnslibs.common.openshift_ops import (
check_service_status,
get_ocp_gluster_pod_names,
@@ -13,7 +13,7 @@ from cnslibs.common.exceptions import ExecutionError
from glusto.core import Glusto as g
-class TestNodeRestart(CnsBaseClass):
+class TestNodeRestart(BaseClass):
def setUp(self):
super(TestNodeRestart, self).setUp()