Skip to content

Commit

Permalink
Add polarion ids
Browse files Browse the repository at this point in the history
Signed-off-by: Mahesh Shetty <[email protected]>
  • Loading branch information
mashetty330 committed Aug 9, 2024
1 parent e8c24dc commit 8406b44
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 11 deletions.
8 changes: 4 additions & 4 deletions ocs_ci/deployment/cnv.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ def remove_hyperconverged(self):
resource_name=constants.KUBEVIRT_HYPERCONVERGED,
namespace=self.namespace,
)
hyperconverged_obj.delete()
hyperconverged_obj.delete(resource_name=constants.KUBEVIRT_HYPERCONVERGED)
logger.info(
f"Deleted {constants.HYPERCONVERGED} {constants.KUBEVIRT_HYPERCONVERGED}"
)
Expand All @@ -674,7 +674,7 @@ def remove_cnv_subscription(self):
resource_name=constants.KUBEVIRT_HYPERCONVERGED,
namespace=self.namespace,
)
cnv_sub.delete()
cnv_sub.delete(resource_name=constants.KUBEVIRT_HYPERCONVERGED)
logger.info(f"Deleted subscription {constants.KUBEVIRT_HYPERCONVERGED}")

def remove_cnv_csv(self):
Expand All @@ -687,7 +687,7 @@ def remove_cnv_csv(self):
selector=constants.CNV_SELECTOR,
namespace=self.namespace,
)
cnv_csv.delete()
cnv_csv.delete(resource_name=cnv_csv.get()["items"][0]["metadata"]["name"])
logger.info(f"Deleted ClusterServiceVersion {constants.CNV_OPERATORNAME}")

def remove_crds(self):
Expand All @@ -708,7 +708,7 @@ def remove_namespace(self):
cnv_namespace = OCP(
kind=constants.NAMESPACE, resource_name=constants.CNV_NAMESPACE
)
cnv_namespace.delete()
cnv_namespace.delete(resource_name=constants.CNV_NAMESPACE)
logger.info(f"Deleted the namespace {constants.CNV_NAMESPACE}")

def cleanup_cnv(self, check_cnv_installed=False):
Expand Down
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7955,7 +7955,8 @@ def finalizer():
Clean up CNV deployment
"""
cnv_obj.cleanup_cnv()
if cnv_obj.cnv_hyperconverged_installed():
cnv_obj.cleanup_cnv()

request.addfinalizer(finalizer)

Expand Down
37 changes: 33 additions & 4 deletions tests/functional/disaster-recovery/sc_arbiter/test_netsplit.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,38 @@ def finalizer():
@pytest.mark.parametrize(
argnames="zones, duration",
argvalues=[
pytest.param(constants.NETSPLIT_DATA_1_DATA_2, 15),
pytest.param(constants.NETSPLIT_ARBITER_DATA_1, 15),
pytest.param(constants.NETSPLIT_ARBITER_DATA_1_AND_ARBITER_DATA_2, 15),
pytest.param(constants.NETSPLIT_ARBITER_DATA_1_AND_DATA_1_DATA_2, 15),
pytest.param(
constants.NETSPLIT_DATA_1_DATA_2,
15,
marks=[
pytest.mark.polarion_id("OCS-5069"),
pytest.mark.polarion_id("OCS-5071"),
],
),
pytest.param(
constants.NETSPLIT_ARBITER_DATA_1,
15,
marks=[
pytest.mark.polarion_id("OCS-5072"),
pytest.mark.polarion_id("OCS-5074"),
],
),
pytest.param(
constants.NETSPLIT_ARBITER_DATA_1_AND_ARBITER_DATA_2,
15,
marks=[
pytest.mark.polarion_id("OCS-5083"),
pytest.mark.polarion_id("OCS-5085"),
],
),
pytest.param(
constants.NETSPLIT_ARBITER_DATA_1_AND_DATA_1_DATA_2,
15,
marks=[
pytest.mark.polarion_id("OCS-5077"),
pytest.mark.polarion_id("OCS-5079"),
],
),
],
ids=[
"Data-1-Data-2",
Expand All @@ -75,6 +103,7 @@ def finalizer():
"Arbiter-Data-1-and-Data-1-Data-2",
],
)
@pytest.mark.polarion_id("OCS-5850")
def test_netsplit(
self,
setup_logwriter_cephfs_workload_factory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,15 @@ def finalizer():
pytest.mark.polarion_id("OCS-5088"),
],
),
pytest.param(1, True, 5, marks=[pytest.mark.polarion_id("OCS-5064")]),
pytest.param(
1,
True,
5,
marks=[
pytest.mark.polarion_id("OCS-5064"),
pytest.mark.polarion_id("OCS-5850"),
],
),
],
ids=[
"Normal-Shutdown",
Expand Down Expand Up @@ -370,7 +378,14 @@ def test_zone_shutdowns(
@pytest.mark.parametrize(
argnames="iteration, delay",
argvalues=[
pytest.param(1, 5, marks=[pytest.mark.polarion_id("OCS-5062")]),
pytest.param(
1,
5,
marks=[
pytest.mark.polarion_id("OCS-5062"),
pytest.mark.polarion_id("OCS-5850"),
],
),
],
)
def test_zone_crashes(
Expand Down

0 comments on commit 8406b44

Please sign in to comment.