diff options
author | vamahaja <vamahaja@redhat.com> | 2020-03-14 14:14:30 +0530 |
---|---|---|
committer | vamahaja <vamahaja@redhat.com> | 2020-03-17 12:21:59 +0530 |
commit | 80bd4bbeaf8feb2298cc3af16e9a1279678234d4 (patch) | |
tree | 3193df60bb80885da1ef8c74e586b1f0384d64a3 /tests/functional/provisioning | |
parent | 2535cae8fbfdfa3eeb9b1c4462f01b8802be96f2 (diff) |
[TestFix] Add pytest marker for tier1 test cases
Change-Id: I1d497a9b61762e68558026ddc49e5269b0354ce1
Signed-off-by: vamahaja <vamahaja@redhat.com>
Diffstat (limited to 'tests/functional/provisioning')
4 files changed, 20 insertions, 0 deletions
diff --git a/tests/functional/provisioning/test_dynamic_provisioning_block.py b/tests/functional/provisioning/test_dynamic_provisioning_block.py index 4677527a..d3966140 100644 --- a/tests/functional/provisioning/test_dynamic_provisioning_block.py +++ b/tests/functional/provisioning/test_dynamic_provisioning_block.py @@ -93,6 +93,7 @@ class TestDynamicProvisioningBlockP0(GlusterBlockBaseClass): """ self.dynamic_provisioning_glusterblock(set_hacount=True) + @pytest.mark.tier1 def test_dynamic_provisioning_glusterblock_hacount_false(self): """Validate storage-class mandatory parameters for block """ @@ -165,6 +166,7 @@ class TestDynamicProvisioningBlockP0(GlusterBlockBaseClass): ret, 0, "Failed to execute command %s on %s" % (write_data_cmd, self.node)) + @pytest.mark.tier1 def test_dynamic_provisioning_glusterblock_gluster_pod_or_node_failure( self): """Create glusterblock PVC when gluster pod or node is down.""" @@ -228,6 +230,7 @@ class TestDynamicProvisioningBlockP0(GlusterBlockBaseClass): ret, out, err = async_io.async_communicate() self.assertEqual(ret, 0, "IO %s failed on %s" % (io_cmd, self.node)) + @pytest.mark.tier1 def test_glusterblock_logs_presence_verification(self): """Validate presence of glusterblock provisioner POD and it's status""" @@ -445,6 +448,7 @@ class TestDynamicProvisioningBlockP0(GlusterBlockBaseClass): % (free_space, free_size)) @skip("Blocked by BZ-1714292") + @pytest.mark.tier1 def test_creation_of_block_vol_greater_than_the_default_size_of_BHV_neg( self): """Verify that block volume creation fails when we create block @@ -501,6 +505,7 @@ class TestDynamicProvisioningBlockP0(GlusterBlockBaseClass): verify_pvc_status_is_bound(self.node, pvc_name) @skip("Blocked by BZ-1714292") + @pytest.mark.tier1 def test_creation_of_block_vol_greater_than_the_default_size_of_BHV_pos( self): """Verify that block volume creation succeed when we create BHV @@ -527,6 +532,7 @@ class TestDynamicProvisioningBlockP0(GlusterBlockBaseClass): self.create_and_wait_for_pvc(pvc_size=(default_bhv_size + 1)) @skip("Blocked by BZ-1714292") + @pytest.mark.tier1 def test_expansion_of_block_hosting_volume_using_heketi(self): """Verify that after expanding block hosting volume we are able to consume the expanded space""" @@ -605,6 +611,7 @@ class TestDynamicProvisioningBlockP0(GlusterBlockBaseClass): pvc_size=(expand_size - 1), pvc_amount=1) @skip("Blocked by BZ-1769426") + @pytest.mark.tier1 def test_targetcli_failure_during_block_pvc_creation(self): h_node, h_server = self.heketi_client_node, self.heketi_server_url @@ -726,6 +733,7 @@ class TestDynamicProvisioningBlockP0(GlusterBlockBaseClass): # Wait for all the PVCs to be in bound state wait_for_pvcs_be_bound(self.node, pvc_names, timeout=300, wait_step=5) + @pytest.mark.tier1 def test_creation_of_pvc_when_one_node_is_down(self): """Test PVC creation when one node is down than hacount""" node_count = len(self.gluster_servers) diff --git a/tests/functional/provisioning/test_dynamic_provisioning_file.py b/tests/functional/provisioning/test_dynamic_provisioning_file.py index f62fa5fe..9f7f07a0 100644 --- a/tests/functional/provisioning/test_dynamic_provisioning_file.py +++ b/tests/functional/provisioning/test_dynamic_provisioning_file.py @@ -481,6 +481,7 @@ class TestDynamicProvisioningP0(BaseClass): oc_delete(self.node, 'pv', pv_name) wait_for_resource_absence(self.node, 'pv', pv_name) + @pytest.mark.tier1 def test_usage_of_default_storage_class(self): """Validate PVs creation for SC with default custom volname prefix""" diff --git a/tests/functional/provisioning/test_pv_resize.py b/tests/functional/provisioning/test_pv_resize.py index 520e9463..20d2c430 100644 --- a/tests/functional/provisioning/test_pv_resize.py +++ b/tests/functional/provisioning/test_pv_resize.py @@ -50,6 +50,7 @@ class TestPvResizeClass(BaseClass): g.log.error(msg) raise self.skipTest(msg) + @pytest.mark.tier1 @ddt.data( (True, True), (False, True), @@ -220,6 +221,7 @@ class TestPvResizeClass(BaseClass): self.assertEqual( ret, 0, "Failed to write data on the expanded PVC") + @pytest.mark.tier1 def test_pv_resize_no_free_space(self): """Validate PVC resize fails if there is no free space available""" if get_openshift_storage_version() < "3.11.5": @@ -234,6 +236,7 @@ class TestPvResizeClass(BaseClass): """Validate PVC resize when resized by exact available free space""" self._pv_resize(exceed_free_space=False) + @pytest.mark.tier1 def test_pv_resize_try_shrink_pv_size(self): """Validate whether reducing the PV size is allowed""" dir_path = "/mnt/" @@ -270,6 +273,7 @@ class TestPvResizeClass(BaseClass): self.assertEqual( ret, 0, "Failed to execute command %s on %s" % (cmd, node)) + @pytest.mark.tier1 def test_pv_resize_when_heketi_down(self): """Create a PVC and try to expand it when heketi is down, It should fail. After heketi is up, expand PVC should work. @@ -338,6 +342,7 @@ class TestPvResizeClass(BaseClass): wait_for_pod_be_ready(self.node, pod_name, 10, 5) @skip("Blocked by BZ-1547069") + @pytest.mark.tier1 def test_pvc_resize_size_greater_than_available_space(self): """Re-size PVC to greater value than available volume size and then expand volume to support maximum size. diff --git a/tests/functional/provisioning/test_storage_class_cases.py b/tests/functional/provisioning/test_storage_class_cases.py index 2955feca..96f56ceb 100644 --- a/tests/functional/provisioning/test_storage_class_cases.py +++ b/tests/functional/provisioning/test_storage_class_cases.py @@ -181,6 +181,7 @@ class TestStorageClassCases(BaseClass): validate_multipath_pod( self.ocp_master_node[0], pod_name, hacount, list(mpaths)[0]) + @pytest.mark.tier1 @ddt.data( {"volumetype": "dist-rep:3"}, {"resturl": "http://10.0.0.1:8080"}, @@ -194,6 +195,7 @@ class TestStorageClassCases(BaseClass): """Validate glusterfile storage with different incorrect parameters""" self.create_sc_with_parameter("glusterfile", parameter=parameter) + @pytest.mark.tier1 @ddt.data( {"resturl": "http://10.0.0.1:8080"}, {"restsecretname": "fakerestsecretname", @@ -329,6 +331,7 @@ class TestStorageClassCases(BaseClass): "Invalid chapauthenabled value '%s'" % chapauthenabled ) + @pytest.mark.tier1 def test_create_and_verify_pvc_with_volume_name_prefix(self): """create and verify pvc with volname prefix on an app pod""" if get_openshift_version() < "3.9": @@ -355,6 +358,7 @@ class TestStorageClassCases(BaseClass): "Failed to read Endpoints of %s on %s " % ( pv_name, self.ocp_master_node[0])) + @pytest.mark.tier1 def test_try_to_create_sc_with_duplicated_name(self): """Verify SC creation fails with duplicate name""" sc_name = "test-sc-duplicated-name-" + utils.get_random_str() @@ -363,6 +367,7 @@ class TestStorageClassCases(BaseClass): with self.assertRaises(AssertionError): self.create_storage_class(sc_name=sc_name) + @pytest.mark.tier1 @ddt.data('secretName', 'secretNamespace', None) def test_sc_glusterfile_missing_parameter(self, parameter): """Validate glusterfile storage with missing parameters""" @@ -392,6 +397,7 @@ class TestStorageClassCases(BaseClass): with self.assertRaises(ExecutionError): verify_pvc_status_is_bound(node, pvc_name, timeout=1) + @pytest.mark.tier1 def test_sc_create_with_clusterid(self): """Create storage class with 'cluster id'""" h_cluster_list = heketi_cluster_list( |