Skip to content
Draft
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
19 changes: 14 additions & 5 deletions test/integration/smoke/test_events_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,25 @@ def test_01_events_resource(self):
diskofferingid=self.disk_offering.id
)
self.cleanup.append(volume)
virtual_machine.attach_volume(
self.apiclient,
volume
)
try:
virtual_machine.attach_volume(
self.apiclient,
volume
)
Comment on lines +150 to +154
except Exception as e:
print("Failed to attach volume to VM: %s" % e)
pass

virtual_machine.stop(self.apiclient)
account_network.restart(self.apiclient, cleanup=False)
time.sleep(self.services["sleep"])
virtual_machine.restore(self.apiclient)
time.sleep(self.services["sleep"])
virtual_machine.detach_volume(self.apiclient, volume)
try:
virtual_machine.detach_volume(self.apiclient, volume)
except Exception as e:
print("Failed to detach volume from VM: %s" % e)
pass
volume.delete(self.apiclient)
self.cleanup.remove(volume)
ts = str(time.time())
Expand Down
5 changes: 5 additions & 0 deletions test/integration/smoke/test_kms_lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def setUpClass(cls):
cls.apiclient = cls.test_client.getApiClient()
cls.zone = get_zone(cls.apiclient, cls.test_client.getZoneForTests())
cls.domain = get_domain(cls.apiclient)
cls.hypervisor = cls.test_client.getHypervisorInfo()

cls._cleanup = []

Expand Down Expand Up @@ -424,6 +425,10 @@ def test_12_deploy_vm_with_root_disk_encryption(self):
Test: deploy a VM with its root disk encrypted using a KMS key.
Verify that the VM starts and the root volume has the KMS key ID.
"""

if self.hypervisor.lower() != 'kvm':
raise self.skipTest("Skipping test case for non-kvm hypervisor")

# 1. Create a KMS key for the user
key = self._create_kms_key(name=_random_name("vm-root-key"), profile_id=self.default_profile.id, apiclient=self.user_apiclient)

Expand Down
4 changes: 3 additions & 1 deletion test/integration/smoke/test_network_extension_namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,8 @@ def _check_kvm_host_prerequisites(self, tools=None):
excluded from the check — the connectivity failure will surface
naturally when the test later tries to deploy scripts.
"""
if self.hv.lower() != 'kvm':
raise self.skipTest("Skipping test case for non-kvm hypervisor")
if tools is None:
tools = ['arping', 'dnsmasq', 'haproxy']
if not self.kvm_host_configs:
Expand Down Expand Up @@ -2387,7 +2389,7 @@ def _mk_action(name, parameters = []):
@attr(tags=["advanced", "smoke"], required_hardware="true")
def test_09_vpc_source_nat_ip_update(self):
"""Update VPC source NAT IP and verify old/new source NAT flags flip correctly."""
self._check_kvm_host_prerequisites(['arping'])
self._check_kvm_host_prerequisites(['ip', 'arping', 'dnsmasq', 'haproxy'])

svc = VPC_NETWORK_SERVICES
_nw_offering, ext_name = self._setup_extension_nsp_offering(
Expand Down
7 changes: 6 additions & 1 deletion test/integration/smoke/test_nonstrict_affinity_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"""

import logging
import time

from marvin.codes import FAILED
from nose.plugins.attrib import attr
Expand All @@ -38,7 +39,6 @@

from marvin.lib.common import (get_domain,
get_zone,
get_template,
get_test_template)


Expand Down Expand Up @@ -209,6 +209,9 @@ def test_01_non_strict_host_anti_affinity(self):
vm_2_host_id,
msg="Both VMs of affinity group %s are on the same host" % self.affinity_group.name)


time.sleep(10)

Comment thread
weizhouapache marked this conversation as resolved.
# 4. Migrate vm-2 to same host as vm-1
self.virtual_machine_2.migrate(
self.apiclient,
Expand Down Expand Up @@ -362,6 +365,8 @@ def test_02_non_strict_host_affinity(self):
vm_12_host_id,
msg="Both VMs of affinity group %s are on the different host" % self.affinity_group.name)

time.sleep(10)

Comment thread
weizhouapache marked this conversation as resolved.
# 4. Migrate vm-12 to different host as vm-11
self.virtual_machine_12.migrate(
self.apiclient
Expand Down
Loading