summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2018-12-15 23:40:26 +0530
committerValerii Ponomarov <vponomar@redhat.com>2018-12-15 23:40:26 +0530
commit90170d48e5d5190e1f552cb4792a5e093e30f8d0 (patch)
treeda84bd2926f9f993f32b623e9f941f3c034b06d5 /tests
parent480d47278e7e82ca596622da8db45ef6f4bde8d9 (diff)
Cleanup base classes
Remove unused/dead code from base classes. Change-Id: Ib355e0282541c60297c1b240f7ff8df3f06d9d69
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/common/gluster_block/test_restart_gluster_block.py4
-rw-r--r--tests/functional/common/heketi/heketi_tests/test_disabling_device.py2
-rw-r--r--tests/functional/common/heketi/heketi_tests/test_heketi_create_volume.py4
-rw-r--r--tests/functional/common/heketi/heketi_tests/test_heketi_enable_device.py4
-rw-r--r--tests/functional/common/heketi/heketi_tests/test_node_enable_disable.py4
-rw-r--r--tests/functional/common/heketi/heketi_tests/test_node_info.py4
-rw-r--r--tests/functional/common/heketi/test_block_volumes_heketi.py4
-rw-r--r--tests/functional/common/heketi/test_check_entries.py4
-rw-r--r--tests/functional/common/heketi/test_create_distributed_replica_heketi_volume.py4
-rw-r--r--tests/functional/common/heketi/test_device_info.py2
-rw-r--r--tests/functional/common/heketi/test_heketi_metrics.py4
-rw-r--r--tests/functional/common/heketi/test_heketi_volume_operations.py24
-rw-r--r--tests/functional/common/heketi/test_volume_creation.py2
-rw-r--r--tests/functional/common/heketi/test_volume_deletion.py4
-rw-r--r--tests/functional/common/heketi/test_volume_expansion_and_devices.py4
-rw-r--r--tests/functional/common/heketi/test_volume_multi_req.py4
-rw-r--r--tests/functional/common/test_heketi_restart.py4
17 files changed, 33 insertions, 49 deletions
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 c46460a0..aa2b1e62 100644
--- a/tests/functional/common/gluster_block/test_restart_gluster_block.py
+++ b/tests/functional/common/gluster_block/test_restart_gluster_block.py
@@ -1,4 +1,4 @@
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.heketi_ops import (
heketi_blockvolume_create,
heketi_blockvolume_delete)
@@ -9,7 +9,7 @@ from cnslibs.common.openshift_ops import (
wait_for_resource_absence)
-class TestRestartGlusterBlockPod(HeketiClientSetupBaseClass):
+class TestRestartGlusterBlockPod(HeketiBaseClass):
def test_restart_gluster_block_provisioner_pod(self):
# CNS-542 - Restart gluster-block provisioner pod
diff --git a/tests/functional/common/heketi/heketi_tests/test_disabling_device.py b/tests/functional/common/heketi/heketi_tests/test_disabling_device.py
index 41cd560c..43d222a2 100644
--- a/tests/functional/common/heketi/heketi_tests/test_disabling_device.py
+++ b/tests/functional/common/heketi/heketi_tests/test_disabling_device.py
@@ -8,7 +8,7 @@ from cnslibs.common import openshift_ops
from cnslibs.common import podcmd
-class TestDisableHeketiDevice(heketi_libs.HeketiClientSetupBaseClass):
+class TestDisableHeketiDevice(heketi_libs.HeketiBaseClass):
@podcmd.GlustoPod()
def test_create_volumes_enabling_and_disabling_heketi_devices(self):
"""Test case CNS-763"""
diff --git a/tests/functional/common/heketi/heketi_tests/test_heketi_create_volume.py b/tests/functional/common/heketi/heketi_tests/test_heketi_create_volume.py
index fcc00535..681c1258 100644
--- a/tests/functional/common/heketi/heketi_tests/test_heketi_create_volume.py
+++ b/tests/functional/common/heketi/heketi_tests/test_heketi_create_volume.py
@@ -5,7 +5,7 @@ from glusto.core import Glusto as g
from glustolibs.gluster.volume_ops import get_volume_list, get_volume_info
import six
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.heketi_ops import (heketi_volume_create,
heketi_volume_list,
heketi_volume_info,
@@ -20,7 +20,7 @@ from cnslibs.common.openshift_ops import get_ocp_gluster_pod_names
from cnslibs.common import podcmd
-class TestHeketiVolume(HeketiClientSetupBaseClass):
+class TestHeketiVolume(HeketiBaseClass):
"""
Class to test heketi volume create
"""
diff --git a/tests/functional/common/heketi/heketi_tests/test_heketi_enable_device.py b/tests/functional/common/heketi/heketi_tests/test_heketi_enable_device.py
index b5a8ef32..17ba6eb5 100644
--- a/tests/functional/common/heketi/heketi_tests/test_heketi_enable_device.py
+++ b/tests/functional/common/heketi/heketi_tests/test_heketi_enable_device.py
@@ -1,7 +1,7 @@
"""Test cases to enable device in heketi."""
import json
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.heketi_ops import (heketi_node_enable,
heketi_node_info,
heketi_node_disable,
@@ -13,7 +13,7 @@ from cnslibs.common.heketi_ops import (heketi_node_enable,
from glusto.core import Glusto as g
-class TestHeketiDeviceEnable(HeketiClientSetupBaseClass):
+class TestHeketiDeviceEnable(HeketiBaseClass):
"""Test device enable functionality from heketi-cli."""
def enable_node(self, node_id):
diff --git a/tests/functional/common/heketi/heketi_tests/test_node_enable_disable.py b/tests/functional/common/heketi/heketi_tests/test_node_enable_disable.py
index bce565c4..9fac9e01 100644
--- a/tests/functional/common/heketi/heketi_tests/test_node_enable_disable.py
+++ b/tests/functional/common/heketi/heketi_tests/test_node_enable_disable.py
@@ -1,7 +1,7 @@
"""Test cases to disable and enable node in heketi."""
import json
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.heketi_ops import (heketi_node_enable,
heketi_node_info,
heketi_node_disable,
@@ -10,7 +10,7 @@ from cnslibs.common.heketi_ops import (heketi_node_enable,
from glusto.core import Glusto as g
-class TestHeketiNodeState(HeketiClientSetupBaseClass):
+class TestHeketiNodeState(HeketiBaseClass):
"""Test node enable and disable functionality."""
def enable_node(self, node_id):
diff --git a/tests/functional/common/heketi/heketi_tests/test_node_info.py b/tests/functional/common/heketi/heketi_tests/test_node_info.py
index 26ac56f7..016b3ec4 100644
--- a/tests/functional/common/heketi/heketi_tests/test_node_info.py
+++ b/tests/functional/common/heketi/heketi_tests/test_node_info.py
@@ -2,12 +2,12 @@ from glusto.core import Glusto as g
from glustolibs.gluster.exceptions import ExecutionError
from glustolibs.gluster.peer_ops import get_pool_list
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common import heketi_ops, podcmd
from cnslibs.common.openshift_ops import get_ocp_gluster_pod_names
-class TestHeketiVolume(HeketiClientSetupBaseClass):
+class TestHeketiVolume(HeketiBaseClass):
"""
Class to test heketi volume create
"""
diff --git a/tests/functional/common/heketi/test_block_volumes_heketi.py b/tests/functional/common/heketi/test_block_volumes_heketi.py
index 4e405312..22dcf18d 100644
--- a/tests/functional/common/heketi/test_block_volumes_heketi.py
+++ b/tests/functional/common/heketi/test_block_volumes_heketi.py
@@ -5,10 +5,10 @@ from cnslibs.common.heketi_ops import (heketi_blockvolume_create,
heketi_volume_create,
heketi_volume_delete
)
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
-class TestBlockVolumeOps(HeketiClientSetupBaseClass):
+class TestBlockVolumeOps(HeketiBaseClass):
"""
Class to test heketi block volume deletion with and without block
volumes existing, heketi block volume list, heketi block volume info
diff --git a/tests/functional/common/heketi/test_check_entries.py b/tests/functional/common/heketi/test_check_entries.py
index be7add9e..92e682d9 100644
--- a/tests/functional/common/heketi/test_check_entries.py
+++ b/tests/functional/common/heketi/test_check_entries.py
@@ -1,12 +1,12 @@
from glusto.core import Glusto as g
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.heketi_ops import (heketi_volume_create,
heketi_volume_delete)
from cnslibs.common.openshift_ops import get_ocp_gluster_pod_names
-class TestHeketiVolume(HeketiClientSetupBaseClass):
+class TestHeketiVolume(HeketiBaseClass):
"""Check volume bricks presence in fstab files on Gluster PODs."""
def _find_bricks_in_fstab_files(self, brick_paths, present):
diff --git a/tests/functional/common/heketi/test_create_distributed_replica_heketi_volume.py b/tests/functional/common/heketi/test_create_distributed_replica_heketi_volume.py
index cbee7550..3dd4230b 100644
--- a/tests/functional/common/heketi/test_create_distributed_replica_heketi_volume.py
+++ b/tests/functional/common/heketi/test_create_distributed_replica_heketi_volume.py
@@ -4,7 +4,7 @@ import math
from glusto.core import Glusto as g
from glustolibs.gluster.volume_ops import get_volume_list, get_volume_info
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.heketi_ops import (heketi_node_list,
heketi_node_enable,
heketi_node_disable,
@@ -18,7 +18,7 @@ from cnslibs.common.openshift_ops import get_ocp_gluster_pod_names
from cnslibs.common import podcmd
-class TestHeketiVolume(HeketiClientSetupBaseClass):
+class TestHeketiVolume(HeketiBaseClass):
def setUp(self):
super(TestHeketiVolume, self).setUp()
diff --git a/tests/functional/common/heketi/test_device_info.py b/tests/functional/common/heketi/test_device_info.py
index 2086245d..b24390ad 100644
--- a/tests/functional/common/heketi/test_device_info.py
+++ b/tests/functional/common/heketi/test_device_info.py
@@ -2,7 +2,7 @@ from cnslibs.common import heketi_libs
from cnslibs.common import heketi_ops
-class TestHeketiDeviceInfo(heketi_libs.HeketiClientSetupBaseClass):
+class TestHeketiDeviceInfo(heketi_libs.HeketiBaseClass):
def test_heketi_devices_info_verification(self):
"""Test case CNS-765"""
diff --git a/tests/functional/common/heketi/test_heketi_metrics.py b/tests/functional/common/heketi/test_heketi_metrics.py
index cf7e2d40..a888b82b 100644
--- a/tests/functional/common/heketi/test_heketi_metrics.py
+++ b/tests/functional/common/heketi/test_heketi_metrics.py
@@ -1,4 +1,4 @@
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.heketi_ops import (
get_heketi_metrics,
heketi_cluster_info,
@@ -15,7 +15,7 @@ from cnslibs.common.openshift_ops import (
)
-class TestHeketiMetrics(HeketiClientSetupBaseClass):
+class TestHeketiMetrics(HeketiBaseClass):
def verify_heketi_metrics_with_topology_info(self):
topology = heketi_topology_info(
diff --git a/tests/functional/common/heketi/test_heketi_volume_operations.py b/tests/functional/common/heketi/test_heketi_volume_operations.py
index 69d4e056..b0deb31e 100644
--- a/tests/functional/common/heketi/test_heketi_volume_operations.py
+++ b/tests/functional/common/heketi/test_heketi_volume_operations.py
@@ -1,9 +1,7 @@
from unittest import skip
from glusto.core import Glusto as g
-from cnslibs.common.heketi_ops import (heketi_create_topology,
- heketi_topology_load,
- heketi_volume_delete,
+from cnslibs.common.heketi_ops import (heketi_volume_delete,
heketi_volume_create,
heketi_volume_expand,
heketi_volume_info,
@@ -15,11 +13,11 @@ from cnslibs.common.heketi_ops import (heketi_create_topology,
heketi_device_delete,
heketi_node_info,
heketi_node_list)
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
-from cnslibs.common.exceptions import ExecutionError, ConfigError
+from cnslibs.common.heketi_libs import HeketiBaseClass
+from cnslibs.common.exceptions import ExecutionError
-class TestHeketiVolumeOperations(HeketiClientSetupBaseClass):
+class TestHeketiVolumeOperations(HeketiBaseClass):
"""
Class to test heketi volume operations - create, expand
"""
@@ -27,20 +25,6 @@ class TestHeketiVolumeOperations(HeketiClientSetupBaseClass):
@classmethod
def setUpClass(cls):
super(TestHeketiVolumeOperations, cls).setUpClass()
-
- if cls.deployment_type == "crs_heketi_outside_openshift":
- ret = heketi_create_topology(cls.heketi_client_node,
- cls.topology_info)
- if not ret:
- raise ConfigError("Failed to create heketi topology file on %s"
- % cls.heketi_client_node)
-
- ret = heketi_topology_load(cls.heketi_client_node,
- cls.heketi_server_url)
- if not ret:
- raise ConfigError("Failed to load heketi topology on %s"
- % cls.heketi_client_node)
-
cls.volume_id = None
def volume_cleanup(self, volume_id):
diff --git a/tests/functional/common/heketi/test_volume_creation.py b/tests/functional/common/heketi/test_volume_creation.py
index 55699136..b3db8446 100644
--- a/tests/functional/common/heketi/test_volume_creation.py
+++ b/tests/functional/common/heketi/test_volume_creation.py
@@ -8,7 +8,7 @@ from cnslibs.common import openshift_ops
from cnslibs.common import podcmd
-class TestVolumeCreationTestCases(heketi_libs.HeketiClientSetupBaseClass):
+class TestVolumeCreationTestCases(heketi_libs.HeketiBaseClass):
"""
Class for volume creation related test cases
"""
diff --git a/tests/functional/common/heketi/test_volume_deletion.py b/tests/functional/common/heketi/test_volume_deletion.py
index 8b0adf98..b1be795b 100644
--- a/tests/functional/common/heketi/test_volume_deletion.py
+++ b/tests/functional/common/heketi/test_volume_deletion.py
@@ -1,11 +1,11 @@
from __future__ import division
from cnslibs.common.exceptions import ExecutionError
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common import heketi_ops
-class TestVolumeDeleteTestCases(HeketiClientSetupBaseClass):
+class TestVolumeDeleteTestCases(HeketiBaseClass):
"""
Class for volume deletion related test cases
diff --git a/tests/functional/common/heketi/test_volume_expansion_and_devices.py b/tests/functional/common/heketi/test_volume_expansion_and_devices.py
index 17ed5d9d..8e8dea9a 100644
--- a/tests/functional/common/heketi/test_volume_expansion_and_devices.py
+++ b/tests/functional/common/heketi/test_volume_expansion_and_devices.py
@@ -7,12 +7,12 @@ from glusto.core import Glusto as g
from glustolibs.gluster import volume_ops, rebalance_ops
from cnslibs.common.exceptions import ExecutionError
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.openshift_ops import get_ocp_gluster_pod_names
from cnslibs.common import heketi_ops, podcmd
-class TestVolumeExpansionAndDevicesTestCases(HeketiClientSetupBaseClass):
+class TestVolumeExpansionAndDevicesTestCases(HeketiBaseClass):
"""
Class for volume expansion and devices addition related test cases
"""
diff --git a/tests/functional/common/heketi/test_volume_multi_req.py b/tests/functional/common/heketi/test_volume_multi_req.py
index 244131e9..5b72cc91 100644
--- a/tests/functional/common/heketi/test_volume_multi_req.py
+++ b/tests/functional/common/heketi/test_volume_multi_req.py
@@ -11,7 +11,7 @@ import yaml
from glusto.core import Glusto as g
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.heketi_ops import (
heketi_volume_list)
from cnslibs.common.naming import (
@@ -192,7 +192,7 @@ def _heketi_name_id_map(vols):
@ddt.ddt
-class TestVolumeMultiReq(HeketiClientSetupBaseClass):
+class TestVolumeMultiReq(HeketiBaseClass):
def setUp(self):
super(TestVolumeMultiReq, self).setUp()
self.volcount = self._count_vols()
diff --git a/tests/functional/common/test_heketi_restart.py b/tests/functional/common/test_heketi_restart.py
index 2d7da8c3..6fd0e10f 100644
--- a/tests/functional/common/test_heketi_restart.py
+++ b/tests/functional/common/test_heketi_restart.py
@@ -1,6 +1,6 @@
from jsondiff import diff
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.heketi_ops import (
hello_heketi,
heketi_volume_create,
@@ -12,7 +12,7 @@ from cnslibs.common.openshift_ops import (
wait_for_resource_absence)
-class TestRestartHeketi(HeketiClientSetupBaseClass):
+class TestRestartHeketi(HeketiBaseClass):
def test_restart_heketi_pod(self):
""" CNS-450 Restarting heketi pod """