Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/integration/broken/test_vpc_vm_life_cycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from component.test_vpc_vm_life_cycle import Services


class TestVMLifeCycleSharedNwVPC(cloudstackTesTODOtCase):
class TestVMLifeCycleSharedNwVPC(cloudstackTestCase):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file ready to be moved out of the 'broken' directory?


@classmethod
def setUpClass(cls):
Expand Down
49 changes: 15 additions & 34 deletions test/integration/component/test_host_ha.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,19 @@
""" BVT tests for Hosts Maintenance
"""

# Import Local Modules
from marvin.codes import FAILED
from marvin.cloudstackTestCase import *
from marvin.cloudstackAPI import *
from marvin.lib.utils import *
from marvin.lib.base import *
from marvin.lib.common import *
from nose.plugins.attrib import attr

from time import sleep

_multiprocess_shared_ = False


class TestHostHA(cloudstackTestCase):

hostCountMsg = "Host HA can be tested with at least two hosts, only %s found"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not related but - isn't this VM HA? (not host HA with ipmi etc?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no? this is test_host_ha, is it?

Copy link
Member

@rohityadavcloud rohityadavcloud May 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not I'm asking even though file says test_host_ha.py, are the tests for Host HA (or VM HA) that uses oobm/ipmi etc? Nevermind I'll check this myself.

Tests are host ha indeed!


def setUp(self):
self.logger = logging.getLogger('TestHM')
self.stream_handler = logging.StreamHandler()
Expand Down Expand Up @@ -86,17 +83,8 @@ def setUp(self):
"timeout": 10,
}


def tearDown(self):
try:
# Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup)

except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)

return

super(TestHostHA, self).tearDown()

def createVMs(self, hostId, number, local):

Expand Down Expand Up @@ -319,19 +307,16 @@ def test_01_host_ha_with_nfs_storagepool_with_vm(self):
for host in listHost:
self.logger.debug('Hypervisor = {}'.format(host.id))


if len(listHost) != 2:
self.logger.debug("Host HA can be tested with two host only %s, found" % len(listHost))
raise unittest.SkipTest("Host HA can be tested with two host only %s, found" % len(listHost))

if len(listHost) < 2:
self.logger.debug(self.hostCountMsg % len(listHost))
raise unittest.SkipTest(self.hostCountMsg % len(listHost))

no_of_vms = self.noOfVMsOnHost(listHost[0].id)

no_of_vms = no_of_vms + self.noOfVMsOnHost(listHost[1].id)

self.logger.debug("Number of VMS on hosts = %s" % no_of_vms)


if no_of_vms < 5:
self.logger.debug("test_01: Create VMs as there are not enough vms to check host ha")
no_vm_req = 5 - no_of_vms
Expand Down Expand Up @@ -396,10 +381,9 @@ def test_02_host_ha_with_local_storage_and_nfs(self):
for host in listHost:
self.logger.debug('Hypervisor = {}'.format(host.id))


if len(listHost) != 2:
self.logger.debug("Host HA can be tested with two host only %s, found" % len(listHost))
raise unittest.SkipTest("Host HA can be tested with two host only %s, found" % len(listHost))
if len(listHost) < 2:
self.logger.debug(self.hostCountMsg % len(listHost))
raise unittest.SkipTest(self.hostCountMsg % len(listHost))

no_of_vms = self.noOfVMsOnHost(listHost[0].id)

Expand Down Expand Up @@ -473,10 +457,9 @@ def test_03_host_ha_with_only_local_storage(self):
for host in listHost:
self.logger.debug('Hypervisor = {}'.format(host.id))


if len(listHost) != 2:
self.logger.debug("Host HA can be tested with two host only %s, found" % len(listHost))
raise unittest.SkipTest("Host HA can be tested with two host only %s, found" % len(listHost))
if len(listHost) < 2:
self.logger.debug(self.hostCountMsg % len(listHost))
raise unittest.SkipTest(self.hostCountMsg % len(listHost))

no_of_vms = self.noOfVMsOnHost(listHost[0].id)

Expand Down Expand Up @@ -548,18 +531,16 @@ def test_04_host_ha_vmactivity_check(self):
for host in listHost:
self.logger.debug('Hypervisor = {}'.format(host.id))


if len(listHost) != 2:
self.logger.debug("Host HA can be tested with two host only %s, found" % len(listHost))
raise unittest.SkipTest("Host HA can be tested with two host only %s, found" % len(listHost))
if len(listHost) < 2:
self.logger.debug(self.hostCountMsg % len(listHost))
raise unittest.SkipTest(self.hostCountMsg % len(listHost))

no_of_vms = self.noOfVMsOnHost(listHost[0].id)

no_of_vms = no_of_vms + self.noOfVMsOnHost(listHost[1].id)

self.logger.debug("Number of VMS on hosts = %s" % no_of_vms)


if no_of_vms < 5:
self.logger.debug("test_01: Create VMs as there are not enough vms to check host ha")
no_vm_req = 5 - no_of_vms
Expand Down
6 changes: 3 additions & 3 deletions test/integration/component/test_rootvolume_resize.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ def test_04_vmreset_after_migrate_vm__rootvolume_resized(self):
return

@attr(tags=["advanced"], required_hardware="true")
def test_5_vmdeployment_with_size(self):
def test_05_vmdeployment_with_size(self):
"""Test vm deployment with new rootdisk size parameter

# Validate the following
Expand Down Expand Up @@ -855,7 +855,7 @@ def test_5_vmdeployment_with_size(self):


@attr(tags=["advanced"], required_hardware="true")
def test_6_resized_rootvolume_with_lessvalue(self):
def test_06_resized_rootvolume_with_lessvalue(self):
"""Test resize root volume with less than original volume size

# Validate the following
Expand Down Expand Up @@ -939,7 +939,7 @@ def test_6_resized_rootvolume_with_lessvalue(self):

# @attr(tags=["advanced"], required_hrdware="true")
@attr(tags=["TODO"], required_hrdware="true")
def test_7_usage_events_after_rootvolume_resized_(self):
def test_07_usage_events_after_rootvolume_resized_(self):
"""Test check usage events after root volume resize

# Validate the following
Expand Down