From 350f51c5830bab84c68114f18b98fbb9ed18d21c Mon Sep 17 00:00:00 2001 From: vavuthu Date: Wed, 29 May 2024 16:26:23 +0530 Subject: [PATCH] increase timeout for restoring pvc snapshot Signed-off-by: vavuthu --- docs/usage.md | 6 ++++++ ocs_ci/framework/pytest_customization/ocscilib.py | 6 +++--- tests/functional/pv/pvc_clone/test_pvc_to_pvc_clone.py | 3 +++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index 5ebee54f0a9f..9d421974b1f1 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -157,6 +157,12 @@ to the pytest. * `--install-lvmo` - Deploy LVMCluster, will skip ODF deployment. * `--lvmo-disks` - Number of disks to add to SNO deployment. * `--lvmo-disks-size` - Size of disks to add to SNO deployment. +* `--disable-environment-checker` - Disable the leftover checks in existing flow. +* `--resource-checker` - This will identify the leftover which was created by test cases. This is + similar to environment-checker, only difference is resource-checker will track the resources + created during test case run whereas environment-checker will track all resources in + cluster irrespective of who created. +* `--kubeconfig` - Location of kubeconfig. ## Examples diff --git a/ocs_ci/framework/pytest_customization/ocscilib.py b/ocs_ci/framework/pytest_customization/ocscilib.py index de9eb447d63d..b36e4d0bead9 100644 --- a/ocs_ci/framework/pytest_customization/ocscilib.py +++ b/ocs_ci/framework/pytest_customization/ocscilib.py @@ -768,7 +768,7 @@ def pytest_runtest_makereport(item, call): test_name = item.nodeid # Write the failure information to a file with open( - f'{ocsci_config.ENV_DATA["cluster_path"]}/failed_testcases.txt', "a" + f'{ocsci_config.ENV_DATA.get("cluster_path")}/failed_testcases.txt', "a" ) as file: file.write(f"{test_name}\n") @@ -776,7 +776,7 @@ def pytest_runtest_makereport(item, call): test_name = item.nodeid # Write the passed information to a file with open( - f'{ocsci_config.ENV_DATA["cluster_path"]}/passed_testcases.txt', "a" + f'{ocsci_config.ENV_DATA.get("cluster_path")}/passed_testcases.txt', "a" ) as file: file.write(f"{test_name}\n") @@ -784,7 +784,7 @@ def pytest_runtest_makereport(item, call): test_name = item.nodeid # Write the skipped information to a file with open( - f'{ocsci_config.ENV_DATA["cluster_path"]}/skipped_testcases.txt', "a" + f'{ocsci_config.ENV_DATA.get("cluster_path")}/skipped_testcases.txt', "a" ) as file: file.write(f"{test_name}\n") diff --git a/tests/functional/pv/pvc_clone/test_pvc_to_pvc_clone.py b/tests/functional/pv/pvc_clone/test_pvc_to_pvc_clone.py index 3074d664cd33..86ccb6495cb2 100644 --- a/tests/functional/pv/pvc_clone/test_pvc_to_pvc_clone.py +++ b/tests/functional/pv/pvc_clone/test_pvc_to_pvc_clone.py @@ -219,6 +219,7 @@ def test_pvc_to_pvc_rox_clone( volume_mode=snapshot_obj.parent_volume_mode, access_mode=constants.ACCESS_MODE_ROX, status=constants.STATUS_BOUND, + timeout=300, ) teardown_factory(restore_snapshot_obj) @@ -333,6 +334,7 @@ def test_pvc_to_pvc_rox_shallow_vol_clone( volume_mode=snapshot_obj.parent_volume_mode, access_mode=constants.ACCESS_MODE_ROX, status=constants.STATUS_BOUND, + timeout=300, ) teardown_factory(restore_snapshot_obj) @@ -470,6 +472,7 @@ def test_pvc_to_pvc_rox_shallow_vol_post_clone( access_mode=constants.ACCESS_MODE_ROX, status=constants.STATUS_BOUND, restore_pvc_name="first-rwx-snapshot-restore-to-rox-mode-00", + timeout=300, ) teardown_factory(restore_snapshot_obj)