Skip to content

Commit

Permalink
Cephblockpool and sc creation is ideally not supported to customer on…
Browse files Browse the repository at this point in the history
… HCI PC platform (#8969)

Skipping the Test cases on HCI Provider Client setup
where Cephblockpool or storageclass creation is involved

Signed-off-by: suchita-g <[email protected]>
  • Loading branch information
suchita-g authored Dec 1, 2023
1 parent 4b072c7 commit 221b437
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
E2ETest,
tier2,
skipif_external_mode,
skipif_hci_provider_and_client,
)
from ocs_ci.ocs.benchmark_operator import BMO_NAME
from ocs_ci.ocs.constants import (
Expand All @@ -21,6 +22,7 @@


@magenta_squad
@skipif_hci_provider_and_client
@tier2
class TestCompressedSCAndSupportSnapClone(E2ETest):
"""
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/workloads/test_new_sc_rbd_e2e_workloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
tier2,
ignore_leftovers,
skipif_external_mode,
skipif_hci_provider_and_client,
)
from ocs_ci.ocs.cluster import (
get_percent_used_capacity,
Expand All @@ -21,6 +22,7 @@

@magenta_squad
@skipif_external_mode
@skipif_hci_provider_and_client
@ignore_leftovers
@tier2
class TestCreateNewScWithNeWRbDPoolE2EWorkloads(E2ETest):
Expand Down
3 changes: 3 additions & 0 deletions tests/manage/monitoring/test_workload_with_distruptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
pre_upgrade,
post_upgrade,
skipif_managed_service,
skipif_hci_provider_and_client,
)
from ocs_ci.ocs import constants, ocp
from ocs_ci.ocs import fiojob
Expand All @@ -61,6 +62,7 @@
@pre_upgrade
@tier2
@skipif_managed_service
@skipif_hci_provider_and_client
def test_workload_with_checksum(workload_storageutilization_checksum_rbd):
"""
Purpose of this test is to have checksum workload fixture executed.
Expand All @@ -77,6 +79,7 @@ def test_workload_with_checksum(workload_storageutilization_checksum_rbd):
@post_upgrade
@tier2
@skipif_managed_service
@skipif_hci_provider_and_client
def test_workload_with_checksum_verify(
tmp_path,
project,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
ManageTest,
tier2,
skipif_managed_service,
skipif_hci_provider_and_client,
skipif_external_mode,
)
from ocs_ci.ocs.exceptions import CommandFailed, UnexpectedBehaviour
Expand All @@ -21,6 +22,7 @@
@skipif_ocs_version("<4.8")
@pytest.mark.polarion_id("OCS-2595")
@skipif_managed_service
@skipif_hci_provider_and_client
@skipif_external_mode
class TestVerifyRbdTrashPurge(ManageTest):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
tier2,
polarion_id,
skipif_managed_service,
skipif_hci_provider_and_client,
skipif_external_mode,
)
from ocs_ci.ocs.exceptions import (
Expand Down Expand Up @@ -59,6 +60,7 @@ def setup(self, project_factory, storageclass_factory, create_pvcs_and_pods):
@tier1
@skipif_external_mode
@skipif_managed_service
@skipif_hci_provider_and_client
def test_rbd_space_reclaim(self):
"""
Test to verify RBD space reclamation
Expand Down Expand Up @@ -142,6 +144,7 @@ def test_rbd_space_reclaim(self):
@polarion_id("OCS-2774")
@tier1
@skipif_managed_service
@skipif_hci_provider_and_client
@skipif_external_mode
def test_rbd_space_reclaim_no_space(self):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
tier1,
acceptance,
skipif_managed_service,
skipif_hci_provider_and_client,
)
from ocs_ci.helpers.helpers import default_storage_class
from ocs_ci.ocs import constants, node
Expand Down Expand Up @@ -92,6 +93,7 @@ def verify_expected_failure_event(self, ocs_obj, failure_str):
pytest.mark.polarion_id("OCS-530"),
pytest.mark.bugzilla("1772990"),
skipif_managed_service,
skipif_hci_provider_and_client,
],
),
pytest.param(
Expand All @@ -110,6 +112,7 @@ def verify_expected_failure_event(self, ocs_obj, failure_str):
pytest.mark.bugzilla("1750916"),
pytest.mark.bugzilla("1772990"),
skipif_managed_service,
skipif_hci_provider_and_client,
],
),
pytest.param(
Expand Down Expand Up @@ -245,7 +248,11 @@ def test_rwo_dynamic_pvc(
argvalues=[
pytest.param(
*[constants.CEPHFILESYSTEM, constants.RECLAIM_POLICY_RETAIN],
marks=[pytest.mark.polarion_id("OCS-542"), skipif_managed_service],
marks=[
pytest.mark.polarion_id("OCS-542"),
skipif_managed_service,
skipif_hci_provider_and_client,
],
),
pytest.param(
*[constants.CEPHFILESYSTEM, constants.RECLAIM_POLICY_DELETE],
Expand Down
7 changes: 4 additions & 3 deletions tests/manage/storageclass/conftest.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import logging
from ocs_ci.framework import config
from ocs_ci.ocs.constants import MANAGED_SERVICE_PLATFORMS
from ocs_ci.ocs.constants import HCI_PC_OR_MS_PLATFORM

log = logging.getLogger(__name__)


def pytest_collection_modifyitems(items):
"""
A pytest hook to filter out storageclass tests
when running on managed service platforms
when running on managed service platforms and
on HCI Provider Client Platform
Args:
items: list of collected tests
"""
if config.ENV_DATA["platform"].lower() in MANAGED_SERVICE_PLATFORMS:
if config.ENV_DATA["platform"].lower() in HCI_PC_OR_MS_PLATFORM:
for item in items.copy():
if "manage/storageclass" in str(item.fspath):
log.debug(
Expand Down
2 changes: 2 additions & 0 deletions tests/manage/z_cluster/test_scc.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
polarion_id,
tier2,
skipif_ocs_version,
skipif_hci_provider_and_client,
brown_squad,
)
from ocs_ci.helpers.sanity_helpers import Sanity
Expand All @@ -34,6 +35,7 @@ class TestSCC:
@tier2
@bugzilla("1938647")
@polarion_id("OCS-4483")
@skipif_hci_provider_and_client
def test_custom_scc_with_pod_respin(self, scc_factory):
"""
Test if OCS deployments/pods get affected if custom scc is created
Expand Down

0 comments on commit 221b437

Please sign in to comment.