From d0604ca7d194a8f158096850ac931d5f5a0b8529 Mon Sep 17 00:00:00 2001 From: vamahaja Date: Thu, 17 Sep 2020 09:32:15 +0530 Subject: [TestFix][Tier2] Update pytest marker for 'tier2' tests Change-Id: I5db480da820c82b7b15f90ed70a4f60643079cb0 Signed-off-by: vamahaja --- tests/functional/heketi/test_block_volumes_heketi.py | 4 ++-- tests/functional/heketi/test_heketi_cluster_operations.py | 12 ++++++------ tests/functional/heketi/test_heketi_create_volume.py | 8 ++++---- tests/functional/heketi/test_heketi_device_operations.py | 8 ++++---- tests/functional/heketi/test_heketi_metrics.py | 10 +++++----- tests/functional/heketi/test_heketi_node_operations.py | 6 +++--- tests/functional/heketi/test_heketi_volume_operations.py | 12 ++++++------ tests/functional/heketi/test_server_state_examine_gluster.py | 4 ++-- tests/functional/heketi/test_volume_creation.py | 6 +++--- tests/functional/heketi/test_volume_multi_req.py | 2 +- 10 files changed, 36 insertions(+), 36 deletions(-) (limited to 'tests/functional/heketi') diff --git a/tests/functional/heketi/test_block_volumes_heketi.py b/tests/functional/heketi/test_block_volumes_heketi.py index a9092b06..cbea98ae 100644 --- a/tests/functional/heketi/test_block_volumes_heketi.py +++ b/tests/functional/heketi/test_block_volumes_heketi.py @@ -224,7 +224,7 @@ class TestBlockVolumeOps(GlusterBlockBaseClass): self.assertEqual(v, vol_info[bhv_name] ["options"][k]) - @pytest.mark.tier1 + @pytest.mark.tier2 @ddt.data(True, False) def test_create_blockvolume_with_different_auth_values(self, auth_value): """To validate block volume creation with different auth values""" @@ -272,7 +272,7 @@ class TestBlockVolumeOps(GlusterBlockBaseClass): ("Block volume Names are not same %s as %s", (block_vol_info["name"], vol_name))) - @pytest.mark.tier1 + @pytest.mark.tier2 @podcmd.GlustoPod() def test_create_max_num_blockhostingvolumes(self): num_of_bv = 10 diff --git a/tests/functional/heketi/test_heketi_cluster_operations.py b/tests/functional/heketi/test_heketi_cluster_operations.py index 68239965..c9289ff5 100644 --- a/tests/functional/heketi/test_heketi_cluster_operations.py +++ b/tests/functional/heketi/test_heketi_cluster_operations.py @@ -12,7 +12,7 @@ from openshiftstoragelibs.waiter import Waiter class TestClusterOperationsTestCases(baseclass.BaseClass): """Class for heketi cluster creation related test cases""" - @pytest.mark.tier1 + @pytest.mark.tier2 @ddt.data("", "block", "file") def test_heketi_cluster_create(self, disable_volume_type): """Test heketi cluster creation""" @@ -38,7 +38,7 @@ class TestClusterOperationsTestCases(baseclass.BaseClass): cluster_info["block"], err_msg % ("block", "False")) self.assertTrue(cluster_info["file"], err_msg % ("file", "False")) - @pytest.mark.tier1 + @pytest.mark.tier2 def test_heketi_cluster_list(self): """Test and validateheketi cluster list operation""" # Create heketi cluster @@ -57,7 +57,7 @@ class TestClusterOperationsTestCases(baseclass.BaseClass): % (cluster_info["id"], cluster_list["clusters"])) self.assertIn(cluster_info["id"], cluster_list["clusters"], err_msg) - @pytest.mark.tier1 + @pytest.mark.tier2 def test_heketi_cluster_info(self): """Test and validateheketi cluster info operation""" # Create heketi cluster @@ -83,7 +83,7 @@ class TestClusterOperationsTestCases(baseclass.BaseClass): for param, value in params: self.assertEqual(get_cluster_info[param], value) - @pytest.mark.tier1 + @pytest.mark.tier2 def test_heketi_cluster_delete(self): """Test and validateheketi cluster delete operation""" # Create heketi cluster @@ -103,7 +103,7 @@ class TestClusterOperationsTestCases(baseclass.BaseClass): % (cluster_info["id"], cluster_list["clusters"])) self.assertNotIn(cluster_info["id"], cluster_list["clusters"], err_msg) - @pytest.mark.tier1 + @pytest.mark.tier2 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") @@ -212,7 +212,7 @@ class TestClusterOperationsTestCases(baseclass.BaseClass): self.assertEqual( zone, storage_zone, err_msg % ("zone", zone, storage_zone)) - @pytest.mark.tier1 + @pytest.mark.tier2 def test_heketi_server_operations_cleanup_on_idle_setup(self): """Run heketi db clean up on an idle setup""" h_node, h_url = self.heketi_client_node, self.heketi_server_url diff --git a/tests/functional/heketi/test_heketi_create_volume.py b/tests/functional/heketi/test_heketi_create_volume.py index a15d4447..f7fb6126 100644 --- a/tests/functional/heketi/test_heketi_create_volume.py +++ b/tests/functional/heketi/test_heketi_create_volume.py @@ -110,7 +110,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 + @pytest.mark.tier2 @podcmd.GlustoPod() def test_create_vol_and_retrieve_vol_info(self): """Validate heketi and gluster volume info""" @@ -194,7 +194,7 @@ class TestHeketiVolume(BaseClass): "\n%s" % (volume_ids[2], existing_volumes)) g.log.info("Sucessfully verified the topology info") - @pytest.mark.tier1 + @pytest.mark.tier2 def test_to_check_deletion_of_cluster(self): """Validate deletion of cluster with volumes""" # List heketi volumes @@ -435,7 +435,7 @@ class TestHeketiVolume(BaseClass): heketi_blockvolume_delete(h_node, h_url, block_vol) heketi_volume_delete(h_node, h_url, volume, raise_on_error=False) - @pytest.mark.tier1 + @pytest.mark.tier2 @ddt.data("", "block") def test_verify_delete_heketi_volumes_pending_entries_in_db( self, vol_type): @@ -592,7 +592,7 @@ class TestHeketiVolume(BaseClass): act_brick_count, exp_brick_count, err_msg.format(act_brick_count, exp_brick_count, "brick")) - @pytest.mark.tier1 + @pytest.mark.tier2 @ddt.data('', 'block') def test_verify_create_heketi_volumes_pending_entries_in_db( self, vol_type): diff --git a/tests/functional/heketi/test_heketi_device_operations.py b/tests/functional/heketi/test_heketi_device_operations.py index 71430a14..c8a9b991 100755 --- a/tests/functional/heketi/test_heketi_device_operations.py +++ b/tests/functional/heketi/test_heketi_device_operations.py @@ -298,7 +298,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 + @pytest.mark.tier2 @ddt.data((True, False), (False, False), (True, True)) @ddt.unpack def test_heketi_device_remove_delete( @@ -428,7 +428,7 @@ class TestHeketiDeviceOperations(BaseClass): heketi_device_disable, heketi_node, heketi_url, device_id) raise - @pytest.mark.tier1 + @pytest.mark.tier2 def test_heketi_device_delete(self): """Test Heketi device delete operation""" @@ -488,7 +488,7 @@ class TestHeketiDeviceOperations(BaseClass): "after the device deletion" % (device_id, node_id)) self.assertNotIn(device_id, node_info_after_deletion, msg) - @pytest.mark.tier1 + @pytest.mark.tier2 def test_heketi_device_info(self): """Validate whether device related information is displayed""" @@ -554,7 +554,7 @@ class TestHeketiDeviceOperations(BaseClass): self.assertEqual(brick[key], brick_from_t[key]) self.assertEqual(brick_match_count, len(device_info['bricks'])) - @pytest.mark.tier1 + @pytest.mark.tier2 def test_device_delete_with_bricks(self): """Validate device deletion with existing bricks on the device""" h_node, h_url = self.heketi_client_node, self.heketi_server_url diff --git a/tests/functional/heketi/test_heketi_metrics.py b/tests/functional/heketi/test_heketi_metrics.py index 9f161607..ec0fc57b 100644 --- a/tests/functional/heketi/test_heketi_metrics.py +++ b/tests/functional/heketi/test_heketi_metrics.py @@ -172,7 +172,7 @@ class TestHeketiMetrics(BaseClass): vol_count['cluster'], json=True) self.assertEqual(vol_count['value'], len(cluster_info['volumes'])) - @pytest.mark.tier1 + @pytest.mark.tier2 def test_heketi_metrics_with_topology_info(self): """Validate heketi metrics generation""" self.verify_heketi_metrics_with_topology_info() @@ -222,7 +222,7 @@ class TestHeketiMetrics(BaseClass): self.verify_heketi_metrics_with_topology_info() - @pytest.mark.tier1 + @pytest.mark.tier2 def test_heketi_metrics_validating_vol_count_on_vol_creation(self): """Validate heketi metrics VolumeCount after volume creation""" @@ -247,7 +247,7 @@ class TestHeketiMetrics(BaseClass): self.verify_volume_count() - @pytest.mark.tier1 + @pytest.mark.tier2 def test_heketi_metrics_validating_vol_count_on_vol_deletion(self): """Validate heketi metrics VolumeCount after volume deletion""" @@ -287,7 +287,7 @@ class TestHeketiMetrics(BaseClass): self.assertNotIn(vol['id'], volume_list) self.verify_volume_count() - @pytest.mark.tier1 + @pytest.mark.tier2 def test_heketi_metrics_validating_cluster_count(self): """Validate 'cluster count' in heketi metrics""" cluster_list = heketi_cluster_list( @@ -305,7 +305,7 @@ class TestHeketiMetrics(BaseClass): self.assertEqual( len(cluster_list['clusters']), metrics['heketi_cluster_count']) - @pytest.mark.tier1 + @pytest.mark.tier2 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 adcbf6ef..65e3554d 100644 --- a/tests/functional/heketi/test_heketi_node_operations.py +++ b/tests/functional/heketi/test_heketi_node_operations.py @@ -54,7 +54,7 @@ class TestHeketiNodeOperations(baseclass.BaseClass): "Heketi volume list %s is not equal to gluster volume list %s" % (node_ips, hostnames)) - @pytest.mark.tier1 + @pytest.mark.tier2 def test_heketi_node_info(self): """Test heketi node info operation """ @@ -254,7 +254,7 @@ class TestHeketiNodeOperations(baseclass.BaseClass): # Add node to valid cluster id self.heketi_node_add_with_valid_cluster() - @pytest.mark.tier1 + @pytest.mark.tier2 def test_validate_heketi_node_add_with_db_check(self): """Test heketi db check after node add operation""" if not self.is_containerized_gluster(): @@ -285,7 +285,7 @@ class TestHeketiNodeOperations(baseclass.BaseClass): " not as expected".format(initial_node_count, final_node_count)) self.assertEqual(initial_node_count + 1, final_node_count, msg) - @pytest.mark.tier1 + @pytest.mark.tier2 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) diff --git a/tests/functional/heketi/test_heketi_volume_operations.py b/tests/functional/heketi/test_heketi_volume_operations.py index ef9ae213..b3192d02 100644 --- a/tests/functional/heketi/test_heketi_volume_operations.py +++ b/tests/functional/heketi/test_heketi_volume_operations.py @@ -32,7 +32,7 @@ class TestHeketiVolumeOperations(BaseClass): super(TestHeketiVolumeOperations, cls).setUpClass() cls.volume_size = 1 - @pytest.mark.tier1 + @pytest.mark.tier2 def test_heketi_with_default_options(self): """ Test to create volume with default options. @@ -52,7 +52,7 @@ class TestHeketiVolumeOperations(BaseClass): "Expected Size: %s, Actual Size: %s" % (self.volume_size, vol_info['size']))) - @pytest.mark.tier1 + @pytest.mark.tier2 def test_heketi_with_expand_volume(self): """ Test volume expand and size if updated correctly in heketi-cli info @@ -86,7 +86,7 @@ class TestHeketiVolumeOperations(BaseClass): "Size: %s" % (str(expected_size), str(volume_info['size'])))) - @pytest.mark.tier1 + @pytest.mark.tier2 def test_heketi_volume_mount(self): self.node = self.ocp_master_node[0] try: @@ -179,7 +179,7 @@ class TestHeketiVolumeOperations(BaseClass): pids.append([g_node, pid]) return pids - @pytest.mark.tier1 + @pytest.mark.tier2 @podcmd.GlustoPod() def test_heketi_volume_snapshot_create_with_one_brick_down(self): """ @@ -242,7 +242,7 @@ class TestHeketiVolumeOperations(BaseClass): "Expecting Snapshot count before {} and after creation {} to be " "same".format(snap_list_before, snap_list_after)) - @pytest.mark.tier1 + @pytest.mark.tier2 def test_heketi_volume_create_mutiple_sizes(self): """Validate creation of heketi volume with differnt sizes""" sizes, required_space = [15, 50, 100], 495 @@ -259,7 +259,7 @@ class TestHeketiVolumeOperations(BaseClass): vol_id = heketi_volume_create(h_node, h_url, size, json=True)['id'] self.addCleanup(heketi_volume_delete, h_node, h_url, vol_id) - @pytest.mark.tier1 + @pytest.mark.tier2 @podcmd.GlustoPod() def test_heketi_volume_snapshot_delete(self): """Test heketi volume snapshot delete operation""" diff --git a/tests/functional/heketi/test_server_state_examine_gluster.py b/tests/functional/heketi/test_server_state_examine_gluster.py index 6b66f13a..0a93c9eb 100644 --- a/tests/functional/heketi/test_server_state_examine_gluster.py +++ b/tests/functional/heketi/test_server_state_examine_gluster.py @@ -27,7 +27,7 @@ class TestHeketiServerStateExamineGluster(BaseClass): self.skipTest("heketi-client package %s does not support server " "state examine gluster" % version.v_str) - @pytest.mark.tier1 + @pytest.mark.tier2 def test_volume_inconsistencies(self): # Examine Gluster cluster and Heketi that there is no inconsistencies out = heketi_ops.heketi_examine_gluster( @@ -130,7 +130,7 @@ class TestHeketiServerStateExamineGluster(BaseClass): db_bricks_count, topology_bricks_count)) self.assertEqual(topology_bricks_count, db_bricks_count, msg) - @pytest.mark.tier1 + @pytest.mark.tier2 @ddt.data('', 'block') def test_compare_heketi_volumes(self, vol_type): """Validate file/block volume count using heketi gluster examine""" diff --git a/tests/functional/heketi/test_volume_creation.py b/tests/functional/heketi/test_volume_creation.py index 54c808dd..d96fa9e0 100644 --- a/tests/functional/heketi/test_volume_creation.py +++ b/tests/functional/heketi/test_volume_creation.py @@ -158,7 +158,7 @@ class TestVolumeCreationTestCases(BaseClass): vol_fail, "Volume should have not been created. Out: %s" % vol_fail) - @pytest.mark.tier1 + @pytest.mark.tier2 @podcmd.GlustoPod() def test_volume_create_replica_2(self): """Validate creation of a replica 2 volume""" @@ -189,7 +189,7 @@ class TestVolumeCreationTestCases(BaseClass): "Brick amount is expected to be 2. " "Actual amount is '%s'" % brick_amount) - @pytest.mark.tier1 + @pytest.mark.tier2 @podcmd.GlustoPod() def test_volume_create_snapshot_enabled(self): """Validate volume creation with snapshot enabled""" @@ -386,7 +386,7 @@ class TestVolumeCreationTestCases(BaseClass): % (vol_name, gluster_v_info['brickCount'])) self.assertFalse(int(gluster_v_info['brickCount']) % 3, msg) - @pytest.mark.tier1 + @pytest.mark.tier2 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 0780be1e..44ea803b 100644 --- a/tests/functional/heketi/test_volume_multi_req.py +++ b/tests/functional/heketi/test_volume_multi_req.py @@ -336,7 +336,7 @@ class TestVolumeMultiReq(BaseClass): # verify this volume in heketi self.assertIn(c2.heketiVolumeName, now_vols) - @pytest.mark.tier1 + @pytest.mark.tier2 # 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. -- cgit