summaryrefslogtreecommitdiffstats
path: root/tests/functional
diff options
context:
space:
mode:
authorvamahaja <vamahaja@redhat.com>2020-03-12 10:08:03 +0530
committervamahaja <vamahaja@redhat.com>2020-03-13 13:26:06 +0530
commit2535cae8fbfdfa3eeb9b1c4462f01b8802be96f2 (patch)
tree14fdd5e0b2b5a1cf1382cedc16618989d2721900 /tests/functional
parentb9db2f4be8f1dcabb31f3ea93f9b3b12bff66603 (diff)
[TestFix] Add pytest marker for tier0 test cases
Change-Id: I29093a09c3f0cc09eaa9c6d94bad882c0bafd91c Signed-off-by: vamahaja <vamahaja@redhat.com>
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/arbiter/test_arbiter.py6
-rw-r--r--tests/functional/gluster_stability/test_restart_gluster_block_prov_pod.py3
-rw-r--r--tests/functional/heketi/test_block_volumes_heketi.py8
-rw-r--r--tests/functional/heketi/test_check_brick_paths.py2
-rw-r--r--tests/functional/heketi/test_create_distributed_replica_heketi_volume.py3
-rw-r--r--tests/functional/heketi/test_heketi_create_volume.py4
-rw-r--r--tests/functional/heketi/test_heketi_device_operations.py3
-rw-r--r--tests/functional/heketi/test_heketi_node_operations.py5
-rw-r--r--tests/functional/heketi/test_restart_heketi_pod.py4
-rw-r--r--tests/functional/heketi/test_server_state_examine_gluster.py2
-rw-r--r--tests/functional/heketi/test_volume_creation.py4
-rw-r--r--tests/functional/heketi/test_volume_deletion.py4
-rw-r--r--tests/functional/heketi/test_volume_expansion_and_devices.py4
-rw-r--r--tests/functional/heketi/test_volume_multi_req.py4
-rw-r--r--tests/functional/provisioning/test_dynamic_provisioning_block.py7
-rw-r--r--tests/functional/provisioning/test_dynamic_provisioning_file.py10
-rw-r--r--tests/functional/provisioning/test_pv_resize.py2
-rw-r--r--tests/functional/provisioning/test_storage_class_cases.py5
-rw-r--r--tests/functional/test_gluster_ops_check.py3
19 files changed, 83 insertions, 0 deletions
diff --git a/tests/functional/arbiter/test_arbiter.py b/tests/functional/arbiter/test_arbiter.py
index b1eed13f..27c9a463 100644
--- a/tests/functional/arbiter/test_arbiter.py
+++ b/tests/functional/arbiter/test_arbiter.py
@@ -3,6 +3,7 @@ import re
import ddt
from glusto.core import Glusto as g
from glustolibs.gluster import volume_ops
+import pytest
from openshiftstoragelibs import baseclass
from openshiftstoragelibs import exceptions
@@ -122,6 +123,7 @@ class TestArbiterVolumeCreateExpandDelete(baseclass.BaseClass):
return bricks
+ @pytest.mark.tier0
def test_arbiter_pvc_create(self):
"""Validate dynamic provision of an arbiter volume"""
@@ -137,6 +139,7 @@ class TestArbiterVolumeCreateExpandDelete(baseclass.BaseClass):
self.verify_amount_and_proportion_of_arbiter_and_data_bricks(vol_info)
+ @pytest.mark.tier0
def test_arbiter_pvc_mount_on_pod(self):
"""Validate new volume creation using app pod"""
# Create sc with gluster arbiter info
@@ -205,6 +208,7 @@ class TestArbiterVolumeCreateExpandDelete(baseclass.BaseClass):
mount_path, available_size))
self.cmd_run(write_data_cmd)
+ @pytest.mark.tier0
def test_create_arbiter_vol_with_more_than_one_brick_set(self):
"""Validate volume creation using heketi for more than six brick set"""
@@ -558,6 +562,7 @@ class TestArbiterVolumeCreateExpandDelete(baseclass.BaseClass):
openshift_ops.oc_delete(self.node, 'pvc', pvc_name)
openshift_ops.wait_for_resource_absence(self.node, 'pvc', pvc_name)
+ @pytest.mark.tier0
def test_arbiter_volume_expand_using_pvc(self):
"""Validate arbiter volume expansion by PVC creation"""
# Create sc with gluster arbiter info
@@ -745,6 +750,7 @@ class TestArbiterVolumeCreateExpandDelete(baseclass.BaseClass):
openshift_ops.verify_pvc_size(self.node, self.pvc_name, pvc_size)
vol_expanded = True
+ @pytest.mark.tier0
@podcmd.GlustoPod()
def test_arbiter_volume_delete_using_pvc(self):
"""Test Arbiter volume delete using pvc when volume is not mounted
diff --git a/tests/functional/gluster_stability/test_restart_gluster_block_prov_pod.py b/tests/functional/gluster_stability/test_restart_gluster_block_prov_pod.py
index 219110a6..7551011a 100644
--- a/tests/functional/gluster_stability/test_restart_gluster_block_prov_pod.py
+++ b/tests/functional/gluster_stability/test_restart_gluster_block_prov_pod.py
@@ -1,3 +1,5 @@
+import pytest
+
from openshiftstoragelibs.baseclass import BaseClass
from openshiftstoragelibs import command
from openshiftstoragelibs.heketi_ops import (
@@ -13,6 +15,7 @@ from openshiftstoragelibs.openshift_ops import (
class TestRestartGlusterBlockPod(BaseClass):
+ @pytest.mark.tier0
def test_restart_gluster_block_provisioner_pod(self):
"""Restart gluster-block provisioner pod."""
diff --git a/tests/functional/heketi/test_block_volumes_heketi.py b/tests/functional/heketi/test_block_volumes_heketi.py
index 1e78180d..7ab6cab0 100644
--- a/tests/functional/heketi/test_block_volumes_heketi.py
+++ b/tests/functional/heketi/test_block_volumes_heketi.py
@@ -6,6 +6,7 @@ from glustolibs.gluster.volume_ops import (
volume_start,
volume_stop,
)
+import pytest
from openshiftstoragelibs.baseclass import BaseClass
from openshiftstoragelibs import exceptions
@@ -44,6 +45,7 @@ class TestBlockVolumeOps(BaseClass):
after manually creating a Block Hosting volume.
"""
+ @pytest.mark.tier0
def test_create_block_vol_after_host_vol_creation(self):
"""Validate block-device after manual block hosting volume creation
using heketi
@@ -61,6 +63,7 @@ class TestBlockVolumeOps(BaseClass):
heketi_blockvolume_delete, self.heketi_client_node,
self.heketi_server_url, block_vol["id"])
+ @pytest.mark.tier0
def test_block_host_volume_delete_without_block_volumes(self):
"""Validate deletion of empty block hosting volume"""
block_host_create_info = heketi_volume_create(
@@ -76,6 +79,7 @@ class TestBlockVolumeOps(BaseClass):
self.heketi_client_node, self.heketi_server_url,
block_hosting_vol_id, json=True)
+ @pytest.mark.tier0
def test_block_volume_delete(self):
"""Validate deletion of gluster-block volume and capacity of used pool
"""
@@ -95,6 +99,7 @@ class TestBlockVolumeOps(BaseClass):
"The block volume has not been successfully deleted,"
" ID is %s" % block_vol["id"])
+ @pytest.mark.tier0
def test_block_volume_list(self):
"""Validate heketi blockvolume list command works as expected"""
created_vol_ids = []
@@ -116,6 +121,7 @@ class TestBlockVolumeOps(BaseClass):
"Block vol with '%s' ID is absent in the "
"list of block volumes." % vol_id)
+ @pytest.mark.tier0
def test_block_host_volume_delete_block_volume_delete(self):
"""Validate block volume and BHV removal using heketi"""
free_space, nodenum = get_total_free_space(
@@ -157,6 +163,7 @@ class TestBlockVolumeOps(BaseClass):
self.assertIn(
block_vol_info["id"], bhv_info["blockinfo"]["blockvolume"])
+ @pytest.mark.tier0
@podcmd.GlustoPod()
def test_validate_gluster_voloptions_blockhostvolume(self):
"""Validate gluster volume options which are set for
@@ -239,6 +246,7 @@ class TestBlockVolumeOps(BaseClass):
("Password is %spresent in %s", (assertion_msg_part,
block_vol["id"])))
+ @pytest.mark.tier0
def test_block_volume_create_with_name(self):
"""Validate creation of block volume with name"""
vol_name = "autotests-heketi-volume-%s" % utils.get_random_str()
diff --git a/tests/functional/heketi/test_check_brick_paths.py b/tests/functional/heketi/test_check_brick_paths.py
index 3c8aa6df..de453de8 100644
--- a/tests/functional/heketi/test_check_brick_paths.py
+++ b/tests/functional/heketi/test_check_brick_paths.py
@@ -1,4 +1,5 @@
from glusto.core import Glusto as g
+import pytest
from openshiftstoragelibs.baseclass import BaseClass
from openshiftstoragelibs.heketi_ops import (
@@ -27,6 +28,7 @@ class TestHeketiVolume(BaseClass):
results.append(out)
assertion_method('present', results)
+ @pytest.mark.tier0
def test_validate_brick_paths_on_gluster_pods_or_nodes(self):
"""Validate brick paths after creation and deletion of a volume."""
diff --git a/tests/functional/heketi/test_create_distributed_replica_heketi_volume.py b/tests/functional/heketi/test_create_distributed_replica_heketi_volume.py
index c2a6e523..e9eccce0 100644
--- a/tests/functional/heketi/test_create_distributed_replica_heketi_volume.py
+++ b/tests/functional/heketi/test_create_distributed_replica_heketi_volume.py
@@ -4,6 +4,7 @@ import math
import ddt
from glusto.core import Glusto as g
from glustolibs.gluster.volume_ops import get_volume_list, get_volume_info
+import pytest
from openshiftstoragelibs.baseclass import BaseClass
from openshiftstoragelibs.heketi_ops import (
@@ -194,12 +195,14 @@ class TestHeketiVolume(BaseClass):
free_space_after_creating_vol,
free_space_after_deleting_vol))
+ @pytest.mark.tier0
def test_to_create_and_delete_dist_rep_vol(self):
"""Validate 2x3 vol type creation when the volume cannot be
carved out of a single device
"""
self._create_distributed_replica_vol(validate_cleanup=True)
+ @pytest.mark.tier0
@ddt.data(True, False)
def test_create_and_delete_dist_replicated_bhv(self, validate_cleanup):
"""Validate distributed replicated bhv using heketi-cli"""
diff --git a/tests/functional/heketi/test_heketi_create_volume.py b/tests/functional/heketi/test_heketi_create_volume.py
index 79d54f48..0ade5946 100644
--- a/tests/functional/heketi/test_heketi_create_volume.py
+++ b/tests/functional/heketi/test_heketi_create_volume.py
@@ -8,6 +8,7 @@ except ImportError:
from glusto.core import Glusto as g
from glustolibs.gluster.volume_ops import get_volume_list, get_volume_info
import mock
+import pytest
import six
from openshiftstoragelibs.baseclass import BaseClass
@@ -43,6 +44,7 @@ class TestHeketiVolume(BaseClass):
super(TestHeketiVolume, cls).setUpClass()
cls.volume_size = 1
+ @pytest.mark.tier0
@podcmd.GlustoPod()
def test_volume_create_and_list_volume(self):
"""Validate heketi and gluster volume list"""
@@ -117,6 +119,7 @@ class TestHeketiVolume(BaseClass):
self.assertTrue(vol_info, "Failed to get volume info %s" % name)
g.log.info("Successfully got the volume info %s" % name)
+ @pytest.mark.tier0
def test_create_vol_and_retrieve_topology_info(self):
volume_names = []
volume_ids = []
@@ -221,6 +224,7 @@ class TestHeketiVolume(BaseClass):
self.assertTrue(out, ("Failed to list heketi cluster"))
g.log.info("All heketi cluster successfully listed")
+ @pytest.mark.tier0
def test_to_check_deletion_of_node(self):
"""Validate deletion of a node which contains devices"""
diff --git a/tests/functional/heketi/test_heketi_device_operations.py b/tests/functional/heketi/test_heketi_device_operations.py
index b4987ba6..aaa7e2c5 100644
--- a/tests/functional/heketi/test_heketi_device_operations.py
+++ b/tests/functional/heketi/test_heketi_device_operations.py
@@ -1,5 +1,6 @@
import ddt
from glusto.core import Glusto as g
+import pytest
from openshiftstoragelibs.baseclass import BaseClass
from openshiftstoragelibs.heketi_ops import (
@@ -95,6 +96,7 @@ class TestHeketiDeviceOperations(BaseClass):
return online_hosts
+ @pytest.mark.tier0
def test_heketi_device_enable_disable(self):
"""Validate device enable and disable functionality"""
@@ -174,6 +176,7 @@ class TestHeketiDeviceOperations(BaseClass):
"None of '%s' volume bricks is present on the '%s' device." % (
vol_info['id'], online_device_id))
+ @pytest.mark.tier0
@ddt.data(True, False)
def test_heketi_device_remove(self, delete_device):
"""Validate remove/delete device using heketi-cli"""
diff --git a/tests/functional/heketi/test_heketi_node_operations.py b/tests/functional/heketi/test_heketi_node_operations.py
index c4908b3c..6b23b325 100644
--- a/tests/functional/heketi/test_heketi_node_operations.py
+++ b/tests/functional/heketi/test_heketi_node_operations.py
@@ -1,6 +1,7 @@
import ddt
from glusto.core import Glusto as g
from glustolibs.gluster import peer_ops
+import pytest
import six
from openshiftstoragelibs import baseclass
@@ -24,6 +25,7 @@ class TestHeketiNodeOperations(baseclass.BaseClass):
self.h_node = self.heketi_client_node
self.h_url = self.heketi_server_url
+ @pytest.mark.tier0
@podcmd.GlustoPod()
def test_heketi_node_list(self):
"""Test node list operation
@@ -70,6 +72,7 @@ class TestHeketiNodeOperations(baseclass.BaseClass):
"Failed to match node ID. Exp: %s, Act: %s" % (
node_id, node_info["id"]))
+ @pytest.mark.tier0
def test_heketi_node_states_enable_disable(self):
"""Test node enable and disable functionality
"""
@@ -162,6 +165,7 @@ class TestHeketiNodeOperations(baseclass.BaseClass):
return storage_hostname, storage_ip
+ @pytest.mark.tier0
@podcmd.GlustoPod()
def test_heketi_node_add_with_valid_cluster(self):
"""Test heketi node add operation with valid cluster id"""
@@ -415,6 +419,7 @@ class TestHeketiNodeOperations(baseclass.BaseClass):
self.h_node, self.h_url, device['id'])
heketi_ops.heketi_node_delete(self.h_node, self.h_url, node_id)
+ @pytest.mark.tier0
@ddt.data('remove', 'delete')
def test_heketi_node_remove_or_delete(self, operation='delete'):
"""Test node remove and delete functionality of heketi and validate
diff --git a/tests/functional/heketi/test_restart_heketi_pod.py b/tests/functional/heketi/test_restart_heketi_pod.py
index 5e778890..90f49682 100644
--- a/tests/functional/heketi/test_restart_heketi_pod.py
+++ b/tests/functional/heketi/test_restart_heketi_pod.py
@@ -6,6 +6,8 @@ except ImportError:
# py2
import json
+import pytest
+
from openshiftstoragelibs.baseclass import BaseClass
from openshiftstoragelibs.heketi_ops import (
heketi_topology_info,
@@ -26,6 +28,7 @@ from openshiftstoragelibs.openshift_ops import (
class TestRestartHeketi(BaseClass):
+ @pytest.mark.tier0
def test_restart_heketi_pod(self):
"""Validate restarting heketi pod"""
@@ -77,6 +80,7 @@ class TestRestartHeketi(BaseClass):
heketi_volume_delete(
self.heketi_client_node, self.heketi_server_url, vol_info['id'])
+ @pytest.mark.tier0
def test_set_heketi_vol_size_and_brick_amount_limits(self):
# Get Heketi secret name
cmd_get_heketi_secret_name = (
diff --git a/tests/functional/heketi/test_server_state_examine_gluster.py b/tests/functional/heketi/test_server_state_examine_gluster.py
index 1afeedd0..60a9e1cb 100644
--- a/tests/functional/heketi/test_server_state_examine_gluster.py
+++ b/tests/functional/heketi/test_server_state_examine_gluster.py
@@ -1,4 +1,5 @@
import ddt
+import pytest
from openshiftstoragelibs.baseclass import BaseClass
from openshiftstoragelibs import heketi_ops
@@ -48,6 +49,7 @@ class TestHeketiServerStateExamineGluster(BaseClass):
"heketi volume list matches with volume list of all nodes",
out['report'])
+ @pytest.mark.tier0
@ddt.data('', 'block')
def test_compare_real_vol_count_with_db_check_info(self, vol_type):
"""Validate file/block volumes using heketi db check."""
diff --git a/tests/functional/heketi/test_volume_creation.py b/tests/functional/heketi/test_volume_creation.py
index 354f7889..a1671c28 100644
--- a/tests/functional/heketi/test_volume_creation.py
+++ b/tests/functional/heketi/test_volume_creation.py
@@ -1,6 +1,7 @@
from glusto.core import Glusto as g
from glustolibs.gluster import snap_ops
from glustolibs.gluster import volume_ops
+import pytest
import six
from openshiftstoragelibs.baseclass import BaseClass
@@ -18,6 +19,7 @@ class TestVolumeCreationTestCases(BaseClass):
super(TestVolumeCreationTestCases, self).setUp()
self.node = self.ocp_master_node[0]
+ @pytest.mark.tier0
@podcmd.GlustoPod()
def test_create_heketi_volume(self):
"""Test heketi volume creation and background gluster validation"""
@@ -90,6 +92,7 @@ class TestVolumeCreationTestCases(BaseClass):
[brick_name]["status"]), 1,
"Brick %s is not up" % brick_name)
+ @pytest.mark.tier0
def test_volume_creation_no_free_devices(self):
"""Validate heketi error is returned when no free devices available"""
node, server_url = self.heketi_client_node, self.heketi_server_url
@@ -242,6 +245,7 @@ class TestVolumeCreationTestCases(BaseClass):
g_vol_info = g_vol_info.get(file_vol)
return g_vol_info
+ @pytest.mark.tier0
def test_volume_creation_of_size_greater_than_the_device_size(self):
"""Validate creation of a volume of size greater than the size of a
device.
diff --git a/tests/functional/heketi/test_volume_deletion.py b/tests/functional/heketi/test_volume_deletion.py
index 97c4924d..5059002e 100644
--- a/tests/functional/heketi/test_volume_deletion.py
+++ b/tests/functional/heketi/test_volume_deletion.py
@@ -1,5 +1,7 @@
from __future__ import division
+import pytest
+
from openshiftstoragelibs.baseclass import BaseClass
from openshiftstoragelibs.exceptions import ExecutionError
from openshiftstoragelibs import heketi_ops
@@ -30,6 +32,7 @@ class TestVolumeDeleteTestCases(BaseClass):
return total_free_space
+ @pytest.mark.tier0
def test_delete_heketi_volume(self):
"""
Method to test heketi volume deletion and whether it
@@ -52,6 +55,7 @@ class TestVolumeDeleteTestCases(BaseClass):
free_space_after_deletion > free_space_after_creation,
"Free space is not reclaimed after deletion of %s" % volume_id)
+ @pytest.mark.tier0
def test_delete_heketidb_volume(self):
"""Method to test heketidb volume deletion via heketi-cli."""
for i in range(0, 2):
diff --git a/tests/functional/heketi/test_volume_expansion_and_devices.py b/tests/functional/heketi/test_volume_expansion_and_devices.py
index f73ed736..cf6eb1a3 100644
--- a/tests/functional/heketi/test_volume_expansion_and_devices.py
+++ b/tests/functional/heketi/test_volume_expansion_and_devices.py
@@ -3,6 +3,7 @@ import math
from glusto.core import Glusto as g
from glustolibs.gluster import volume_ops, rebalance_ops
+import pytest
from openshiftstoragelibs.baseclass import BaseClass
from openshiftstoragelibs import (
@@ -161,6 +162,7 @@ class TestVolumeExpansionAndDevicesTestCases(BaseClass):
device_delete, False,
"Device %s could not be deleted" % device_id)
+ @pytest.mark.tier0
def test_volume_expansion_expanded_volume(self):
"""Validate volume expansion with brick and check rebalance"""
creation_info = heketi_ops.heketi_volume_create(
@@ -300,6 +302,7 @@ class TestVolumeExpansionAndDevicesTestCases(BaseClass):
"Free space not reclaimed after deletion of %s"
% volume_id)
+ @pytest.mark.tier0
def test_volume_expansion_no_free_space(self):
"""Validate volume expansion when there is no free space"""
@@ -437,6 +440,7 @@ class TestVolumeExpansionAndDevicesTestCases(BaseClass):
free_space_after_deletion, free_space_after_expansion,
"Free space not reclaimed after deletion of volume %s" % volume_id)
+ @pytest.mark.tier0
@podcmd.GlustoPod()
def test_volume_expansion_rebalance_brick(self):
"""Validate volume expansion with brick and check rebalance"""
diff --git a/tests/functional/heketi/test_volume_multi_req.py b/tests/functional/heketi/test_volume_multi_req.py
index 9fcaeb49..44c53035 100644
--- a/tests/functional/heketi/test_volume_multi_req.py
+++ b/tests/functional/heketi/test_volume_multi_req.py
@@ -7,6 +7,7 @@ import threading
import time
import ddt
+import pytest
import yaml
from glusto.core import Glusto as g
@@ -222,6 +223,7 @@ class TestVolumeMultiReq(BaseClass):
ocp_node = list(g.config['ocp_servers']['master'].keys())[0]
return len(_heketi_vols(ocp_node, self.heketi_server_url))
+ @pytest.mark.tier0
def test_simple_serial_vol_create(self):
"""Test that serially creating PVCs causes heketi to add volumes.
"""
@@ -282,6 +284,7 @@ class TestVolumeMultiReq(BaseClass):
self.assertIn(c2.heketiVolumeName, now_vols)
self.assertNotIn(c2.heketiVolumeName, orig_vols)
+ @pytest.mark.tier0
def test_multiple_vol_create(self):
"""Test creating two volumes via PVCs with no waiting between
the PVC requests.
@@ -383,6 +386,7 @@ class TestVolumeMultiReq(BaseClass):
c.update_pv_info(ocp_node)
self.assertIn(c.heketiVolumeName, now_vols)
+ @pytest.mark.tier0
def test_create_delete_volumes_concurrently(self):
"""Test creating volume when "other processes" are creating
and deleting other volumes in the background.
diff --git a/tests/functional/provisioning/test_dynamic_provisioning_block.py b/tests/functional/provisioning/test_dynamic_provisioning_block.py
index d8a7fca8..4677527a 100644
--- a/tests/functional/provisioning/test_dynamic_provisioning_block.py
+++ b/tests/functional/provisioning/test_dynamic_provisioning_block.py
@@ -3,6 +3,7 @@ import random
from unittest import skip
from glusto.core import Glusto as g
+import pytest
from openshiftstoragelibs.baseclass import GlusterBlockBaseClass
from openshiftstoragelibs.command import cmd_run
@@ -86,6 +87,7 @@ class TestDynamicProvisioningBlockP0(GlusterBlockBaseClass):
ret, 0,
"Failed to execute '%s' command on '%s'." % (cmd, self.node))
+ @pytest.mark.tier0
def test_dynamic_provisioning_glusterblock_hacount_true(self):
"""Validate dynamic provisioning for glusterblock
"""
@@ -96,6 +98,7 @@ class TestDynamicProvisioningBlockP0(GlusterBlockBaseClass):
"""
self.dynamic_provisioning_glusterblock(set_hacount=False)
+ @pytest.mark.tier0
def test_dynamic_provisioning_glusterblock_heketipod_failure(self):
"""Validate PVC with glusterblock creation when heketi pod is down"""
datafile_path = '/mnt/fake_file_for_%s' % self.id()
@@ -264,6 +267,7 @@ class TestDynamicProvisioningBlockP0(GlusterBlockBaseClass):
self.ocp_client[0], cmd % log, gluster_node=g_host)
self.assertTrue(out, "Command '%s' output is empty." % cmd)
+ @pytest.mark.tier0
def test_dynamic_provisioning_glusterblock_heketidown_pvc_delete(self):
"""Validate PVC deletion when heketi is down"""
@@ -301,6 +305,7 @@ class TestDynamicProvisioningBlockP0(GlusterBlockBaseClass):
# create a new PVC
self.create_and_wait_for_pvc()
+ @pytest.mark.tier0
def test_recreate_app_pod_with_attached_block_pv(self):
"""Validate app pod attached block device I/O after restart"""
datafile_path = '/mnt/temporary_test_file'
@@ -329,6 +334,7 @@ class TestDynamicProvisioningBlockP0(GlusterBlockBaseClass):
# Perform I/O on the new POD
self.cmd_run(write_cmd % (new_pod_name, datafile_path))
+ @pytest.mark.tier0
def test_volname_prefix_glusterblock(self):
"""Validate custom volname prefix blockvol"""
@@ -348,6 +354,7 @@ class TestDynamicProvisioningBlockP0(GlusterBlockBaseClass):
self.assertTrue(vol_name.startswith(
self.sc.get('volumenameprefix', 'autotest')))
+ @pytest.mark.tier0
def test_dynamic_provisioning_glusterblock_reclaim_policy_retain(self):
"""Validate retain policy for gluster-block after PVC deletion"""
diff --git a/tests/functional/provisioning/test_dynamic_provisioning_file.py b/tests/functional/provisioning/test_dynamic_provisioning_file.py
index d771b635..f62fa5fe 100644
--- a/tests/functional/provisioning/test_dynamic_provisioning_file.py
+++ b/tests/functional/provisioning/test_dynamic_provisioning_file.py
@@ -1,6 +1,7 @@
import time
from glusto.core import Glusto as g
+import pytest
from openshiftstoragelibs.baseclass import BaseClass
from openshiftstoragelibs.exceptions import ExecutionError
@@ -107,11 +108,13 @@ class TestDynamicProvisioningP0(BaseClass):
ret, 0,
"Failed to execute '%s' command on %s" % (cmd, self.node))
+ @pytest.mark.tier0
def test_dynamic_provisioning_glusterfile(self):
"""Validate dynamic provisioning for gluster file"""
g.log.info("test_dynamic_provisioning_glusterfile")
self.dynamic_provisioning_glusterfile(False)
+ @pytest.mark.tier0
def test_dynamic_provisioning_glusterfile_volname_prefix(self):
"""Validate dynamic provisioning for gluster file with vol name prefix
"""
@@ -123,6 +126,7 @@ class TestDynamicProvisioningP0(BaseClass):
g.log.info("test_dynamic_provisioning_glusterfile volname prefix")
self.dynamic_provisioning_glusterfile(True)
+ @pytest.mark.tier0
def test_dynamic_provisioning_glusterfile_heketipod_failure(self):
"""Validate dynamic provisioning for gluster file when heketi pod down
"""
@@ -205,6 +209,7 @@ class TestDynamicProvisioningP0(BaseClass):
ret, 0,
"Failed to execute command %s on %s" % (write_data_cmd, self.node))
+ @pytest.mark.tier0
def test_dynamic_provisioning_glusterfile_gluster_pod_or_node_failure(
self):
"""Create glusterblock PVC when gluster pod or node is down."""
@@ -281,6 +286,7 @@ class TestDynamicProvisioningP0(BaseClass):
ret, out, err = async_io.async_communicate()
self.assertEqual(ret, 0, "IO %s failed on %s" % (io_cmd, self.node))
+ @pytest.mark.tier0
def test_storage_class_mandatory_params_glusterfile(self):
"""Validate storage-class creation with mandatory parameters"""
@@ -330,6 +336,7 @@ class TestDynamicProvisioningP0(BaseClass):
self.assertEqual(
ret, 0, "Failed to execute command %s on %s" % (cmd, self.node))
+ @pytest.mark.tier0
def test_dynamic_provisioning_glusterfile_heketidown_pvc_delete(self):
"""Validate deletion of PVC's when heketi is down"""
@@ -367,6 +374,7 @@ class TestDynamicProvisioningP0(BaseClass):
# create a new PVC
self.create_and_wait_for_pvc()
+ @pytest.mark.tier0
def test_validate_pvc_in_multiple_app_pods(self):
"""Validate the use of a same claim in multiple app pods"""
replicas = 5
@@ -396,6 +404,7 @@ class TestDynamicProvisioningP0(BaseClass):
for pod_name in pod_names:
self.assertIn("temp_%s" % pod_name, ls_out)
+ @pytest.mark.tier0
def test_pvc_deletion_while_pod_is_running(self):
"""Validate PVC deletion while pod is running"""
if get_openshift_version() <= "3.9":
@@ -423,6 +432,7 @@ class TestDynamicProvisioningP0(BaseClass):
self.assertEqual(
ret, 0, "Failed to execute command %s on %s" % (cmd, self.node))
+ @pytest.mark.tier0
def test_dynamic_provisioning_glusterfile_reclaim_policy_retain(self):
"""Validate retain policy for glusterfs after deletion of pvc"""
diff --git a/tests/functional/provisioning/test_pv_resize.py b/tests/functional/provisioning/test_pv_resize.py
index 5ac956a2..520e9463 100644
--- a/tests/functional/provisioning/test_pv_resize.py
+++ b/tests/functional/provisioning/test_pv_resize.py
@@ -2,6 +2,7 @@ from unittest import skip
import ddt
from glusto.core import Glusto as g
+import pytest
from openshiftstoragelibs.baseclass import BaseClass
from openshiftstoragelibs.openshift_storage_libs import enable_pvc_resize
@@ -228,6 +229,7 @@ class TestPvResizeClass(BaseClass):
self._pv_resize(exceed_free_space=True)
+ @pytest.mark.tier0
def test_pv_resize_by_exact_free_space(self):
"""Validate PVC resize when resized by exact available free space"""
self._pv_resize(exceed_free_space=False)
diff --git a/tests/functional/provisioning/test_storage_class_cases.py b/tests/functional/provisioning/test_storage_class_cases.py
index ef4728b6..2955feca 100644
--- a/tests/functional/provisioning/test_storage_class_cases.py
+++ b/tests/functional/provisioning/test_storage_class_cases.py
@@ -1,5 +1,6 @@
import ddt
from glusto.core import Glusto as g
+import pytest
from openshiftstoragelibs.exceptions import ExecutionError
from openshiftstoragelibs.heketi_ops import (
@@ -204,6 +205,7 @@ class TestStorageClassCases(BaseClass):
"""Validate glusterblock storage with different incorrect parameters"""
self.create_sc_with_parameter("glusterblock", parameter=parameter)
+ @pytest.mark.tier0
@ddt.data(1, 2)
def test_gluster_block_provisioning_with_valid_ha_count(self, hacount):
"""Validate gluster-block provisioning with different valid 'hacount'
@@ -235,6 +237,7 @@ class TestStorageClassCases(BaseClass):
if hacount > 1:
self.validate_multipath_info(hacount)
+ @pytest.mark.tier0
def test_gluster_block_provisioning_with_ha_count_as_glusterpod(self):
"""Validate gluster-block provisioning with "hacount" value equal
to gluster pods count
@@ -264,6 +267,7 @@ class TestStorageClassCases(BaseClass):
)
self.validate_multipath_info(hacount)
+ @pytest.mark.tier0
def test_gluster_block_provisioning_with_invalid_ha_count(self):
"""Validate gluster-block provisioning with any invalid 'hacount'
value
@@ -295,6 +299,7 @@ class TestStorageClassCases(BaseClass):
)
self.validate_multipath_info(gluster_pod_count)
+ @pytest.mark.tier0
@ddt.data('true', 'false', '')
def test_gluster_block_chapauthenabled_parameter(self, chapauthenabled):
"""Validate gluster-block provisioning with different
diff --git a/tests/functional/test_gluster_ops_check.py b/tests/functional/test_gluster_ops_check.py
index fc966342..a184aa2f 100644
--- a/tests/functional/test_gluster_ops_check.py
+++ b/tests/functional/test_gluster_ops_check.py
@@ -1,4 +1,5 @@
from glustolibs.gluster.brickmux_ops import is_brick_mux_enabled
+import pytest
from openshiftstoragelibs.baseclass import BaseClass
from openshiftstoragelibs.openshift_ops import cmd_run_on_gluster_pod_or_node
@@ -7,6 +8,7 @@ from openshiftstoragelibs import podcmd
class TestOpsCheck(BaseClass):
+ @pytest.mark.tier0
@podcmd.GlustoPod()
def test_check_bmux_enabled(self):
"""Check if the brickmultiplexing is enalbed"""
@@ -17,6 +19,7 @@ class TestOpsCheck(BaseClass):
err_msg = ("Brick multiplex is not enabled")
self.assertTrue(bmux_status, err_msg)
+ @pytest.mark.tier0
def test_check_max_brick_per_process(self):
"""Check if the max-brick process is set to 250"""