mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Various fixes to tests
- Configuration fixes in Security groups and Egress rules - Fixing white spaces in component test suite
This commit is contained in:
parent
a725fdc3ab
commit
b433b1afa6
@ -372,6 +372,7 @@ class TestRemoveUserFromAccount(cloudstackTestCase):
|
||||
"Check state of VMs associated with account"
|
||||
)
|
||||
return
|
||||
|
||||
@unittest.skip("Open Questions")
|
||||
def test_02_remove_all_users(self):
|
||||
"""Test Remove both users from the account
|
||||
@ -695,6 +696,7 @@ class TestServiceOfferingSiblings(cloudstackTestCase):
|
||||
)
|
||||
return
|
||||
|
||||
|
||||
@unittest.skip("Open Questions")
|
||||
class TestServiceOfferingHierarchy(cloudstackTestCase):
|
||||
|
||||
@ -821,6 +823,7 @@ class TestServiceOfferingHierarchy(cloudstackTestCase):
|
||||
)
|
||||
return
|
||||
|
||||
|
||||
@unittest.skip("Open Questions")
|
||||
class TesttemplateHierarchy(cloudstackTestCase):
|
||||
|
||||
@ -959,6 +962,7 @@ class TesttemplateHierarchy(cloudstackTestCase):
|
||||
)
|
||||
return
|
||||
|
||||
|
||||
class TestAddVmToSubDomain(cloudstackTestCase):
|
||||
|
||||
@classmethod
|
||||
@ -1039,6 +1043,7 @@ class TestAddVmToSubDomain(cloudstackTestCase):
|
||||
#Clean up, terminate the created resources
|
||||
cleanup_resources(cls.api_client, cls._cleanup)
|
||||
except Exception as e:
|
||||
|
||||
raise Exception("Warning: Exception during cleanup : %s" % e)
|
||||
return
|
||||
|
||||
@ -1056,7 +1061,6 @@ class TestAddVmToSubDomain(cloudstackTestCase):
|
||||
raise Exception("Warning: Exception during cleanup : %s" % e)
|
||||
return
|
||||
|
||||
|
||||
def test_01_add_vm_to_subdomain(self):
|
||||
""" Test Sub domain allowed to launch VM when a Domain level zone is
|
||||
created"""
|
||||
|
||||
@ -26,6 +26,7 @@ from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
|
||||
|
||||
class Services:
|
||||
"""Test Services
|
||||
"""
|
||||
@ -909,7 +910,6 @@ class TestRouterRestart(cloudstackTestCase):
|
||||
self.apiclient = self.testClient.getApiClient()
|
||||
return
|
||||
|
||||
|
||||
def test_01_restart_network_cleanup(self):
|
||||
"""TS_BUG_008-Test restart network
|
||||
"""
|
||||
|
||||
@ -110,6 +110,7 @@ class Services:
|
||||
"protocol": 'TCP',
|
||||
"startport": 22,
|
||||
"endport": 22,
|
||||
"cidrlist": '0.0.0.0/0'
|
||||
},
|
||||
"mgmt_server": {
|
||||
"username": "root",
|
||||
@ -1965,6 +1966,7 @@ class TestStartStopVMWithEgressRule(cloudstackTestCase):
|
||||
)
|
||||
return
|
||||
|
||||
|
||||
@unittest.skip("Valid bug- ID: CS-12647")
|
||||
class TestInvalidParametersForEgress(cloudstackTestCase):
|
||||
|
||||
@ -2329,12 +2331,12 @@ class TestEgressAfterHostMaintainance(cloudstackTestCase):
|
||||
)
|
||||
vm = vms[0]
|
||||
|
||||
self.debug("Enabling host maintainance for ID: %s" % host.id)
|
||||
self.debug("Enabling host maintainance for ID: %s" % vm.hostid)
|
||||
cmd = prepareHostForMaintenance.prepareHostForMaintenanceCmd()
|
||||
cmd.id = vm.hostid
|
||||
self.apiclient.prepareHostForMaintenance(cmd)
|
||||
|
||||
self.debug("Canceling host maintainance for ID: %s" % host.id)
|
||||
self.debug("Canceling host maintainance for ID: %s" % vm.hostid)
|
||||
cmd = cancelHostMaintenance.cancelHostMaintenanceCmd()
|
||||
cmd.id = vm.hostid
|
||||
self.apiclient.cancelHostMaintenance(cmd)
|
||||
|
||||
@ -809,7 +809,6 @@ class TestNOWithNetscaler(cloudstackTestCase):
|
||||
# address for different public port ranges.
|
||||
# 9. On source NAT ipaddress, we should NOT be allowed to Enable VPN.
|
||||
|
||||
|
||||
# Create a network offering with all virtual router services enabled
|
||||
self.debug(
|
||||
"Creating n/w offering with all services in VR & conserve mode:ON"
|
||||
@ -1080,7 +1079,6 @@ class TestNOWithNetscaler(cloudstackTestCase):
|
||||
# address for different public port ranges.
|
||||
# 9. On source NAT ipaddress, we should be allowed to Enable VPN.
|
||||
|
||||
|
||||
# Create a network offering with all virtual router services enabled
|
||||
self.debug(
|
||||
"Creating n/w offering with all services in VR & conserve mode:ON"
|
||||
|
||||
@ -169,11 +169,14 @@ class TestUserProjectCreation(cloudstackTestCase):
|
||||
raise Exception("Warning: Exception during cleanup : %s" % e)
|
||||
return
|
||||
|
||||
|
||||
def test_01_admin_project_creation(self):
|
||||
"""Test create project as a domain admin and domain user
|
||||
"""
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
tags = ["advanced", "basic", "sg", "eip", "advancedns"]
|
||||
>>>>>>> 6d17e21... This commit has following fixes:
|
||||
# Validate the following
|
||||
# 1. Check if 'allow.user.create.projects' configuration is true
|
||||
# 2. Create a Project as domain admin
|
||||
@ -263,6 +266,7 @@ class TestUserProjectCreation(cloudstackTestCase):
|
||||
"Check list project response returns a valid project"
|
||||
)
|
||||
return
|
||||
|
||||
@unittest.skip("Known bug-able to create project as a domain user")
|
||||
def test_02_user_project_creation(self):
|
||||
"""Test create project as a domain admin and domain user
|
||||
@ -390,10 +394,13 @@ class TestProjectInviteRequired(cloudstackTestCase):
|
||||
raise Exception("Warning: Exception during cleanup : %s" % e)
|
||||
return
|
||||
|
||||
|
||||
def test_03_add_user_to_project(self):
|
||||
"""Add user to project when 'project.invite.required' is false"""
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
tags = ["advanced", "basic", "sg", "eip", "advancedns"]
|
||||
>>>>>>> 6d17e21... This commit has following fixes:
|
||||
# Validate the following:
|
||||
# 1. Create a Project
|
||||
# 2. Add users to the project. Verify user is added to project
|
||||
@ -1148,6 +1155,7 @@ class TestProjectInviteRequired(cloudstackTestCase):
|
||||
"Check for a valid list accounts response"
|
||||
)
|
||||
return
|
||||
|
||||
@unittest.skip("Requires SMPT configs")
|
||||
def test_09_invite_to_project_by_email(self):
|
||||
"""Test invite user to project by email"""
|
||||
|
||||
@ -25,6 +25,7 @@ from integration.lib.base import *
|
||||
from integration.lib.common import *
|
||||
import datetime
|
||||
|
||||
|
||||
class Services:
|
||||
"""Test Resource Limits Services
|
||||
"""
|
||||
@ -300,6 +301,7 @@ class TestProjectLimits(cloudstackTestCase):
|
||||
projectid=project.id
|
||||
)
|
||||
return
|
||||
|
||||
@unittest.skip("No provision for updating resource limits from account through API")
|
||||
def test_02_project_limits_normal_user(self):
|
||||
""" Test project limits
|
||||
@ -589,7 +591,11 @@ class TestResourceLimitsProject(cloudstackTestCase):
|
||||
def test_04_publicip_per_project(self):
|
||||
"""Test Public IP limit per project
|
||||
"""
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
tags = ["advanced", "eip", "advancedns"]
|
||||
>>>>>>> 6d17e21... This commit has following fixes:
|
||||
# Validate the following
|
||||
# 1. set max no of IPs per project to 2.
|
||||
# 2. Create an account in this domain
|
||||
@ -800,8 +806,13 @@ class TestResourceLimitsProject(cloudstackTestCase):
|
||||
def test_07_templates_per_project(self):
|
||||
"""Test Templates limit per project
|
||||
"""
|
||||
<<<<<<< HEAD
|
||||
|
||||
# Validate the following
|
||||
=======
|
||||
tags = ["advanced", "basic", "sg", "eip", "advancedns"]
|
||||
# Validate the following
|
||||
>>>>>>> 6d17e21... This commit has following fixes:
|
||||
# 1. set max no of templates per project to 1.
|
||||
# 2. Create a template in this project. Both template should be in
|
||||
# ready state
|
||||
|
||||
@ -26,6 +26,7 @@ from integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
import datetime
|
||||
|
||||
|
||||
class Services:
|
||||
"""Test Resource creation Services
|
||||
"""
|
||||
@ -382,7 +383,11 @@ class TestNetwork(cloudstackTestCase):
|
||||
def test_03_network_create(self):
|
||||
""" Test create network in project
|
||||
"""
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
tags = ["advanced", "advancedns"]
|
||||
>>>>>>> 6d17e21... This commit has following fixes:
|
||||
# Validate the following
|
||||
# 1. Create a project.
|
||||
# 2. Add virtual/direct network resource to the project. User shared
|
||||
@ -586,8 +591,13 @@ class TestTemplates(cloudstackTestCase):
|
||||
def test_04_public_template_use_in_project(self):
|
||||
"""Test Templates creation in projects
|
||||
"""
|
||||
<<<<<<< HEAD
|
||||
|
||||
# Validate the following
|
||||
=======
|
||||
tags = ["advanced", "basic", "sg", "eip", "advancedns"]
|
||||
# Validate the following
|
||||
>>>>>>> 6d17e21... This commit has following fixes:
|
||||
# 1. Create a project
|
||||
# 2. Verify Public templates can be used without any restriction
|
||||
# 3. Verify that template created in project can be used in project
|
||||
@ -645,8 +655,13 @@ class TestTemplates(cloudstackTestCase):
|
||||
def test_05_use_private_template_in_project(self):
|
||||
"""Test use of private template in a project
|
||||
"""
|
||||
<<<<<<< HEAD
|
||||
|
||||
# Validate the following
|
||||
=======
|
||||
tags = ["advanced", "basic", "sg", "eip", "advancedns"]
|
||||
# Validate the following
|
||||
>>>>>>> 6d17e21... This commit has following fixes:
|
||||
# 1. Create a project
|
||||
# 2. Verify that in order to use somebody’s Private template for vm
|
||||
# creation in the project, permission to use the template has to
|
||||
@ -964,7 +979,11 @@ class TestPublicIpAddress(cloudstackTestCase):
|
||||
def test_07_associate_public_ip(self):
|
||||
"""Test associate public IP within the project
|
||||
"""
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
tags = ["advanced", "eip", "advancedns"]
|
||||
>>>>>>> 6d17e21... This commit has following fixes:
|
||||
# Validate the following
|
||||
# 1. Create a project
|
||||
# 2. Add some public Ips to the project
|
||||
|
||||
@ -26,6 +26,7 @@ from integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
import datetime
|
||||
|
||||
|
||||
class Services:
|
||||
"""Test Snapshots Services
|
||||
"""
|
||||
@ -1077,7 +1078,11 @@ class TestLBRuleUsage(cloudstackTestCase):
|
||||
def test_01_lb_usage(self):
|
||||
"""Test Create/Delete a LB rule and verify correct usage is recorded
|
||||
"""
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
tags = ["advanced", "eip", "advancedns"]
|
||||
>>>>>>> 6d17e21... This commit has following fixes:
|
||||
# Validate the following
|
||||
# 1. Acquire a IP for this account. lb.rule.create event is registered
|
||||
# for this account in cloud.usage_event table
|
||||
@ -1435,7 +1440,11 @@ class TestNatRuleUsage(cloudstackTestCase):
|
||||
def test_01_nat_usage(self):
|
||||
"""Test Create/Delete a PF rule and verify correct usage is recorded
|
||||
"""
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
tags = ["advanced", "advancedns"]
|
||||
>>>>>>> 6d17e21... This commit has following fixes:
|
||||
# Validate the following
|
||||
# 1. Acquire a IP for this account
|
||||
# 2. Create a PF rule on the IP associated with this account.
|
||||
@ -1618,7 +1627,11 @@ class TestVpnUsage(cloudstackTestCase):
|
||||
def test_01_vpn_usage(self):
|
||||
"""Test Create/Delete a VPN and verify correct usage is recorded
|
||||
"""
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
tags = ["advanced", "advancedns"]
|
||||
>>>>>>> 6d17e21... This commit has following fixes:
|
||||
# Validate the following
|
||||
# 1. Enable VPN for this IP. vpn.add.user event is registered for this
|
||||
# account in cloud.usage_event table
|
||||
|
||||
@ -576,6 +576,7 @@ class TestDeleteAccountWithProject(cloudstackTestCase):
|
||||
self.account.account.name)
|
||||
return
|
||||
|
||||
|
||||
@unittest.skip("Deleting domain doesn't cleanup account")
|
||||
class TestDeleteDomainWithProject(cloudstackTestCase):
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@ from integration.lib.base import *
|
||||
from integration.lib.common import *
|
||||
import datetime
|
||||
|
||||
|
||||
class Services:
|
||||
"""Test Resource Limits Services
|
||||
"""
|
||||
@ -81,6 +82,7 @@ class Services:
|
||||
"mode": 'advanced',
|
||||
}
|
||||
|
||||
|
||||
class TestResourceLimitsAccount(cloudstackTestCase):
|
||||
|
||||
@classmethod
|
||||
|
||||
@ -580,7 +580,6 @@ class TestRouterServices(cloudstackTestCase):
|
||||
return
|
||||
|
||||
|
||||
|
||||
class TestRouterStopCreatePF(cloudstackTestCase):
|
||||
|
||||
@classmethod
|
||||
@ -791,6 +790,7 @@ class TestRouterStopCreatePF(cloudstackTestCase):
|
||||
)
|
||||
return
|
||||
|
||||
|
||||
class TestRouterStopCreateLB(cloudstackTestCase):
|
||||
|
||||
@classmethod
|
||||
@ -1223,4 +1223,3 @@ class TestRouterStopCreateFW(cloudstackTestCase):
|
||||
"Check public IP address"
|
||||
)
|
||||
return
|
||||
|
||||
|
||||
@ -767,7 +767,7 @@ class TestDhcpOnlyRouter(cloudstackTestCase):
|
||||
zoneid=router.zoneid,
|
||||
type='Routing',
|
||||
state='Up',
|
||||
virtualmachineid=self.virtual_machine.id
|
||||
id=router.hostid
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(hosts, list),
|
||||
|
||||
@ -25,6 +25,7 @@ from integration.lib.base import *
|
||||
from integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
|
||||
|
||||
class Services:
|
||||
"""Test Snapshots Services
|
||||
"""
|
||||
|
||||
@ -26,6 +26,7 @@ from integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
import datetime
|
||||
|
||||
|
||||
class Services:
|
||||
"""Test Snapshots Services
|
||||
"""
|
||||
@ -1318,7 +1319,11 @@ class TestNatRuleUsage(cloudstackTestCase):
|
||||
def test_01_nat_usage(self):
|
||||
"""Test Create/Delete a PF rule and verify correct usage is recorded
|
||||
"""
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
tags = ["advanced", "advancedns"]
|
||||
>>>>>>> 6d17e21... This commit has following fixes:
|
||||
# Validate the following
|
||||
# 1. Acquire a IP for this account
|
||||
# 2. Create a PF rule on the IP associated with this account.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user