Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Mahesh Shetty <[email protected]>
  • Loading branch information
Mahesh Shetty authored and Mahesh Shetty committed Sep 4, 2024
1 parent 687b149 commit 70803b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions ocs_ci/deployment/cnv.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,9 +649,9 @@ def disable_multicluster_engine(self):
return
logger.info(cmd_res.stdout.decode("utf-8").splitlines())

def check_if_any_vm_instances(self, namespace=None):
def check_if_any_vm_and_vmi(self, namespace=None):
"""
Checks if any VMs or VM instances are running
Checks if any VMs and VM instances are running
Args:
namespace (str): namespace to check
Expand Down Expand Up @@ -747,15 +747,15 @@ def uninstall_cnv(self, check_cnv_installed=True):
Uninstall CNV deployment
Args:
check_cnv_installed (Bool): True if want to check if CNV installed
check_cnv_installed (bool): True if want to check if CNV installed
"""
if check_cnv_installed:
if not self.cnv_hyperconverged_installed():
logger.info("CNV is not installed, skipping the cleanup...")
return

assert not self.check_if_any_vm_instances(), (
assert not self.check_if_any_vm_and_vmi(), (
"Vm or Vmi instances are found in the cluster,"
"Please make sure all VMs and VM instances are removed"
)
Expand Down
3 changes: 1 addition & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7699,7 +7699,6 @@ def finalizer():

@pytest.fixture(scope="session")
def scale_noobaa_resources_session(request):

"""
Session scoped fixture to scale noobaa resources
Expand All @@ -7717,7 +7716,6 @@ def scale_noobaa_resources_fixture(request):


def scale_noobaa_resources(request):

"""
Scale the noobaa pod resources and scale endpoint count
Expand Down Expand Up @@ -8296,4 +8294,5 @@ def finalizer():
# Uninstall CNV only if installed by this fixture
if installed:
cnv_obj.uninstall_cnv()

request.addfinalizer(finalizer)

0 comments on commit 70803b7

Please sign in to comment.