diff options
Diffstat (limited to 'tests/functional/heketi')
12 files changed, 43 insertions, 0 deletions
diff --git a/tests/functional/heketi/test_block_volumes_heketi.py b/tests/functional/heketi/test_block_volumes_heketi.py index 7ab6cab0..4d2c1718 100644 --- a/tests/functional/heketi/test_block_volumes_heketi.py +++ b/tests/functional/heketi/test_block_volumes_heketi.py @@ -219,6 +219,7 @@ class TestBlockVolumeOps(BaseClass): self.assertEqual(v, vol_info[bhv_name] ["options"][k]) + @pytest.mark.tier1 @ddt.data(True, False) def test_create_blockvolume_with_different_auth_values(self, auth_value): """To validate block volume creation with different auth values""" @@ -266,6 +267,7 @@ class TestBlockVolumeOps(BaseClass): ("Block volume Names are not same %s as %s", (block_vol_info["name"], vol_name))) + @pytest.mark.tier1 @podcmd.GlustoPod() def test_create_max_num_blockhostingvolumes(self): num_of_bv = 10 @@ -362,6 +364,7 @@ class TestBlockVolumeOps(BaseClass): # Check if all blockhosting volumes are deleted from heketi self.assertFalse(new_bhv_list) + @pytest.mark.tier1 @podcmd.GlustoPod() def test_targetcli_when_block_hosting_volume_down(self): """Validate no inconsistencies occur in targetcli when block volumes diff --git a/tests/functional/heketi/test_disabling_device.py b/tests/functional/heketi/test_disabling_device.py index 27e50190..39c4baf6 100644 --- a/tests/functional/heketi/test_disabling_device.py +++ b/tests/functional/heketi/test_disabling_device.py @@ -1,5 +1,6 @@ from glusto.core import Glusto as g from glustolibs.gluster.volume_ops import get_volume_info +import pytest from openshiftstoragelibs import baseclass from openshiftstoragelibs import heketi_ops @@ -7,6 +8,7 @@ from openshiftstoragelibs import podcmd class TestDisableHeketiDevice(baseclass.BaseClass): + @pytest.mark.tier1 @podcmd.GlustoPod() def test_create_volumes_enabling_and_disabling_heketi_devices(self): """Validate enable/disable of heketi device""" diff --git a/tests/functional/heketi/test_heketi_cluster_operations.py b/tests/functional/heketi/test_heketi_cluster_operations.py index c26ac6bf..e776914f 100644 --- a/tests/functional/heketi/test_heketi_cluster_operations.py +++ b/tests/functional/heketi/test_heketi_cluster_operations.py @@ -1,5 +1,6 @@ import ddt from glusto.core import Glusto as g +import pytest from openshiftstoragelibs import baseclass from openshiftstoragelibs import exceptions @@ -10,6 +11,7 @@ from openshiftstoragelibs import heketi_ops class TestClusterOperationsTestCases(baseclass.BaseClass): """Class for heketi cluster creation related test cases""" + @pytest.mark.tier1 @ddt.data("", "block", "file") def test_heketi_cluster_create(self, disable_volume_type): """Test heketi cluster creation""" @@ -35,6 +37,7 @@ class TestClusterOperationsTestCases(baseclass.BaseClass): cluster_info["block"], err_msg % ("block", "False")) self.assertTrue(cluster_info["file"], err_msg % ("file", "False")) + @pytest.mark.tier1 def test_heketi_cluster_list(self): """Test and validateheketi cluster list operation""" # Create heketi cluster @@ -53,6 +56,7 @@ class TestClusterOperationsTestCases(baseclass.BaseClass): % (cluster_info["id"], cluster_list["clusters"])) self.assertIn(cluster_info["id"], cluster_list["clusters"], err_msg) + @pytest.mark.tier1 def test_heketi_cluster_info(self): """Test and validateheketi cluster info operation""" # Create heketi cluster @@ -78,6 +82,7 @@ class TestClusterOperationsTestCases(baseclass.BaseClass): for param, value in params: self.assertEqual(get_cluster_info[param], value) + @pytest.mark.tier1 def test_heketi_cluster_delete(self): """Test and validateheketi cluster delete operation""" # Create heketi cluster @@ -97,6 +102,7 @@ class TestClusterOperationsTestCases(baseclass.BaseClass): % (cluster_info["id"], cluster_list["clusters"])) self.assertNotIn(cluster_info["id"], cluster_list["clusters"], err_msg) + @pytest.mark.tier1 def test_create_heketi_cluster_and_add_node(self): """Test heketi node add to a newly created cluster""" storage_host_info = g.config.get("additional_gluster_servers") diff --git a/tests/functional/heketi/test_heketi_create_volume.py b/tests/functional/heketi/test_heketi_create_volume.py index 0ade5946..556b4055 100644 --- a/tests/functional/heketi/test_heketi_create_volume.py +++ b/tests/functional/heketi/test_heketi_create_volume.py @@ -91,6 +91,7 @@ class TestHeketiVolume(BaseClass): "of Heketi volumes before and after volume creation: %s\n%s" % ( existing_h_vol_list, h_vol_list)) + @pytest.mark.tier1 @podcmd.GlustoPod() def test_create_vol_and_retrieve_vol_info(self): """Validate heketi and gluster volume info""" @@ -174,6 +175,7 @@ class TestHeketiVolume(BaseClass): "\n%s" % (volume_ids[2], existing_volumes)) g.log.info("Sucessfully verified the topology info") + @pytest.mark.tier1 def test_to_check_deletion_of_cluster(self): """Validate deletion of cluster with volumes""" # List heketi volumes @@ -277,6 +279,7 @@ class TestHeketiVolume(BaseClass): self.heketi_client_node, heketi_url, node_id, json=True) self.assertEqual(node_info['state'].lower(), 'online') + @pytest.mark.tier1 def test_blockvolume_create_no_free_space(self): """Validate error is returned when free capacity is exhausted""" @@ -336,6 +339,7 @@ class TestHeketiVolume(BaseClass): max_block_hosting_vol_size, blockvol2, block_hosting_vol, '\n'.join(file_volumes_debug_info)))) + @pytest.mark.tier1 @podcmd.GlustoPod() def test_heketi_volume_create_with_cluster_node_down(self): if len(self.gluster_servers) < 5: @@ -375,6 +379,7 @@ class TestHeketiVolume(BaseClass): volume_name, g_vol_list) self.assertIn(volume_name, g_vol_list, msg) + @pytest.mark.tier1 def test_verify_pending_entries_in_db(self): """Verify pending entries of volumes and bricks in db during volume creation from heketi side diff --git a/tests/functional/heketi/test_heketi_device_operations.py b/tests/functional/heketi/test_heketi_device_operations.py index aaa7e2c5..9be4d3af 100644 --- a/tests/functional/heketi/test_heketi_device_operations.py +++ b/tests/functional/heketi/test_heketi_device_operations.py @@ -329,6 +329,7 @@ class TestHeketiDeviceOperations(BaseClass): "Some of the '%s' volume bricks is present of the removed " "'%s' device." % (vol_info['id'], lowest_device_id)) + @pytest.mark.tier1 def test_heketi_device_removal_with_insuff_space(self): """Validate heketi with device removal insufficient space""" @@ -417,6 +418,7 @@ class TestHeketiDeviceOperations(BaseClass): heketi_device_disable, heketi_node, heketi_url, device_id) raise + @pytest.mark.tier1 def test_heketi_device_delete(self): """Test Heketi device delete operation""" @@ -476,6 +478,7 @@ class TestHeketiDeviceOperations(BaseClass): "after the device deletion" % (device_id, node_id)) self.assertNotIn(device_id, node_info_after_deletion, msg) + @pytest.mark.tier1 def test_heketi_device_info(self): """Validate whether device related information is displayed""" diff --git a/tests/functional/heketi/test_heketi_metrics.py b/tests/functional/heketi/test_heketi_metrics.py index 8c74f5f5..9f161607 100644 --- a/tests/functional/heketi/test_heketi_metrics.py +++ b/tests/functional/heketi/test_heketi_metrics.py @@ -1,3 +1,5 @@ +import pytest + from openshiftstoragelibs.baseclass import BaseClass from openshiftstoragelibs.heketi_ops import ( get_heketi_metrics, @@ -170,10 +172,12 @@ class TestHeketiMetrics(BaseClass): vol_count['cluster'], json=True) self.assertEqual(vol_count['value'], len(cluster_info['volumes'])) + @pytest.mark.tier1 def test_heketi_metrics_with_topology_info(self): """Validate heketi metrics generation""" self.verify_heketi_metrics_with_topology_info() + @pytest.mark.tier1 def test_heketi_metrics_heketipod_failure(self): """Validate heketi metrics after heketi pod failure""" scale_dc_pod_amount_and_wait( @@ -218,6 +222,7 @@ class TestHeketiMetrics(BaseClass): self.verify_heketi_metrics_with_topology_info() + @pytest.mark.tier1 def test_heketi_metrics_validating_vol_count_on_vol_creation(self): """Validate heketi metrics VolumeCount after volume creation""" @@ -242,6 +247,7 @@ class TestHeketiMetrics(BaseClass): self.verify_volume_count() + @pytest.mark.tier1 def test_heketi_metrics_validating_vol_count_on_vol_deletion(self): """Validate heketi metrics VolumeCount after volume deletion""" @@ -281,6 +287,7 @@ class TestHeketiMetrics(BaseClass): self.assertNotIn(vol['id'], volume_list) self.verify_volume_count() + @pytest.mark.tier1 def test_heketi_metrics_validating_cluster_count(self): """Validate 'cluster count' in heketi metrics""" cluster_list = heketi_cluster_list( @@ -298,6 +305,7 @@ class TestHeketiMetrics(BaseClass): self.assertEqual( len(cluster_list['clusters']), metrics['heketi_cluster_count']) + @pytest.mark.tier1 def test_heketi_metrics_validating_existing_node_count(self): """Validate existing 'node count' in heketi metrics""" metrics = get_heketi_metrics( diff --git a/tests/functional/heketi/test_heketi_node_operations.py b/tests/functional/heketi/test_heketi_node_operations.py index 6b23b325..118b3d0c 100644 --- a/tests/functional/heketi/test_heketi_node_operations.py +++ b/tests/functional/heketi/test_heketi_node_operations.py @@ -54,6 +54,7 @@ class TestHeketiNodeOperations(baseclass.BaseClass): "Heketi volume list %s is not equal to gluster volume list %s" % (node_ips, hostnames)) + @pytest.mark.tier1 def test_heketi_node_info(self): """Test heketi node info operation """ @@ -244,6 +245,7 @@ class TestHeketiNodeOperations(baseclass.BaseClass): storage_ip, ep_addresses) self.assertIn(storage_ip, ep_addresses, err_msg) + @pytest.mark.tier1 def test_heketi_node_add_with_invalid_cluster(self): """Test heketi node add operation with invalid cluster id""" storage_hostname, cluster_id = None, utils.get_random_str(size=33) @@ -530,6 +532,7 @@ class TestHeketiNodeOperations(baseclass.BaseClass): for node_id in h_nodes_list[2:]: self.addCleanup(h.heketi_node_enable, h_node, h_url, node_id) + @pytest.mark.tier1 @ddt.data( ("volume", "create"), ("volume", "delete"), diff --git a/tests/functional/heketi/test_heketi_volume_operations.py b/tests/functional/heketi/test_heketi_volume_operations.py index 5d702d63..64b4c78b 100644 --- a/tests/functional/heketi/test_heketi_volume_operations.py +++ b/tests/functional/heketi/test_heketi_volume_operations.py @@ -3,6 +3,7 @@ from glustolibs.gluster.snap_ops import ( snap_delete, snap_list, ) +import pytest from openshiftstoragelibs.baseclass import BaseClass from openshiftstoragelibs.command import cmd_run @@ -28,6 +29,7 @@ class TestHeketiVolumeOperations(BaseClass): super(TestHeketiVolumeOperations, cls).setUpClass() cls.volume_size = 1 + @pytest.mark.tier1 def test_heketi_with_default_options(self): """ Test to create volume with default options. @@ -47,6 +49,7 @@ class TestHeketiVolumeOperations(BaseClass): "Expected Size: %s, Actual Size: %s" % (self.volume_size, vol_info['size']))) + @pytest.mark.tier1 def test_heketi_with_expand_volume(self): """ Test volume expand and size if updated correctly in heketi-cli info @@ -80,6 +83,7 @@ class TestHeketiVolumeOperations(BaseClass): "Size: %s" % (str(expected_size), str(volume_info['size'])))) + @pytest.mark.tier1 def test_heketi_volume_mount(self): self.node = self.ocp_master_node[0] try: @@ -126,6 +130,7 @@ class TestHeketiVolumeOperations(BaseClass): cmd_run_on_gluster_pod_or_node(self.node, 'ls %s/%s' % ( brick['path'], _file), brick_host) + @pytest.mark.tier1 @podcmd.GlustoPod() def test_heketi_volume_snapshot_create(self): """Test heketi volume snapshot create operation""" diff --git a/tests/functional/heketi/test_heketi_zones.py b/tests/functional/heketi/test_heketi_zones.py index b0b79ecc..0dd4424f 100644 --- a/tests/functional/heketi/test_heketi_zones.py +++ b/tests/functional/heketi/test_heketi_zones.py @@ -8,6 +8,7 @@ except ImportError: import ddt from glusto.core import Glusto as g +import pytest from openshiftstoragelibs import baseclass from openshiftstoragelibs import heketi_ops @@ -119,6 +120,7 @@ class TestHeketiZones(baseclass.BaseClass): (node_info["zone"], node_info['hostnames']['storage'])) return online_nodes + @pytest.mark.tier1 @ddt.data( (3, "strict", False), (3, "strict", True), diff --git a/tests/functional/heketi/test_server_state_examine_gluster.py b/tests/functional/heketi/test_server_state_examine_gluster.py index 60a9e1cb..210111ca 100644 --- a/tests/functional/heketi/test_server_state_examine_gluster.py +++ b/tests/functional/heketi/test_server_state_examine_gluster.py @@ -18,6 +18,7 @@ class TestHeketiServerStateExamineGluster(BaseClass): self.skipTest("heketi-client package %s does not support server " "state examine gluster" % version.v_str) + @pytest.mark.tier1 def test_volume_inconsistencies(self): # Examine Gluster cluster and Heketi that there is no inconsistencies out = heketi_ops.heketi_examine_gluster( @@ -73,6 +74,7 @@ class TestHeketiServerStateExamineGluster(BaseClass): "%svolume count doesn't match expected " "result %s, actual result is %s" % (vol_type, count, vol_count)) + @pytest.mark.tier1 def test_compare_node_count_with_db_check_info(self): """Validate nodes count using heketi db check""" diff --git a/tests/functional/heketi/test_volume_creation.py b/tests/functional/heketi/test_volume_creation.py index a1671c28..3d9c917e 100644 --- a/tests/functional/heketi/test_volume_creation.py +++ b/tests/functional/heketi/test_volume_creation.py @@ -156,6 +156,7 @@ class TestVolumeCreationTestCases(BaseClass): vol_fail, "Volume should have not been created. Out: %s" % vol_fail) + @pytest.mark.tier1 @podcmd.GlustoPod() def test_volume_create_replica_2(self): """Validate creation of a replica 2 volume""" @@ -186,6 +187,7 @@ class TestVolumeCreationTestCases(BaseClass): "Brick amount is expected to be 2. " "Actual amount is '%s'" % brick_amount) + @pytest.mark.tier1 @podcmd.GlustoPod() def test_volume_create_snapshot_enabled(self): """Validate volume creation with snapshot enabled""" @@ -374,6 +376,7 @@ class TestVolumeCreationTestCases(BaseClass): % (vol_name, gluster_v_info['brickCount'])) self.assertFalse(int(gluster_v_info['brickCount']) % 3) + @pytest.mark.tier1 def test_create_volume_with_same_name(self): """Test create two volumes with the same name and verify that 2nd one is failing with the appropriate error. diff --git a/tests/functional/heketi/test_volume_multi_req.py b/tests/functional/heketi/test_volume_multi_req.py index 44c53035..0c1b42ac 100644 --- a/tests/functional/heketi/test_volume_multi_req.py +++ b/tests/functional/heketi/test_volume_multi_req.py @@ -338,6 +338,7 @@ class TestVolumeMultiReq(BaseClass): # verify this volume in heketi self.assertIn(c2.heketiVolumeName, now_vols) + @pytest.mark.tier1 # NOTE(jjm): I've noticed that on the system I'm using (RHEL7). # with count=8 things start to back up a bit. # I needed to increase some timeouts to get this to pass. |