forked from red-hat-storage/ocs-ci
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding a new test case for reclaim space job and cronjob on rwop pvc (r…
…ed-hat-storage#10096) * adding new test case for reclaim space job and cronjob on rwop pvc * adding rwop reclaim space as a separate file and only for rbd Signed-off-by: Yulia Persky <[email protected]>
- Loading branch information
1 parent
e685557
commit 06a6627
Showing
3 changed files
with
105 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
tests/functional/pv/pv_services/test_rwop_pvc_reclaim_space.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import logging | ||
|
||
from ocs_ci.ocs import constants | ||
from ocs_ci.framework.pytest_customization.marks import green_squad | ||
from ocs_ci.framework.testlib import ( | ||
ManageTest, | ||
tier2, | ||
skipif_ocs_version, | ||
) | ||
from ocs_ci.helpers import helpers | ||
|
||
log = logging.getLogger(__name__) | ||
|
||
|
||
@green_squad | ||
@tier2 | ||
@skipif_ocs_version("<4.15") | ||
class TestRwopPvcReclaimSpace(ManageTest): | ||
""" | ||
Tests Reclaim Space on ReadWriteOncePod RBD PVC | ||
""" | ||
|
||
def test_rwop_pvc_reclaim_space(self, pvc_factory): | ||
""" | ||
Test to verify creation of reclaim space job and reclaim space cron job on RWOP pvc | ||
""" | ||
|
||
pvc_obj = pvc_factory( | ||
interface=constants.CEPHBLOCKPOOL, | ||
access_mode=constants.ACCESS_MODE_RWOP, | ||
size=10, | ||
) | ||
|
||
schedule = "weekly" | ||
reclaim_space_job = pvc_obj.create_reclaim_space_cronjob(schedule) | ||
helpers.wait_for_reclaim_space_cronjob(reclaim_space_job, schedule) | ||
|
||
reclaim_space_job = pvc_obj.create_reclaim_space_job() | ||
|
||
helpers.wait_for_reclaim_space_job(reclaim_space_job) |