From ed35cba89997c0466ab1074b73c9d86fefb0045b Mon Sep 17 00:00:00 2001 From: shweta Date: Wed, 4 Jul 2012 17:36:42 +0530 Subject: [PATCH] Adding tags to identify configurations of tests * project tests * usage tests --- .../component/test_project_configs.py | 24 +++++++++---------- .../component/test_project_limits.py | 16 ++++++------- .../component/test_project_resources.py | 16 ++++++------- .../component/test_project_usage.py | 18 +++++++------- test/integration/component/test_projects.py | 20 ++++++++-------- test/integration/component/test_usage.py | 18 +++++++------- 6 files changed, 55 insertions(+), 57 deletions(-) diff --git a/test/integration/component/test_project_configs.py b/test/integration/component/test_project_configs.py index 20e2f8af1ed..7888b000e91 100644 --- a/test/integration/component/test_project_configs.py +++ b/test/integration/component/test_project_configs.py @@ -170,13 +170,12 @@ class TestUserProjectCreation(cloudstackTestCase): def test_01_admin_project_creation(self): """Test create project as a domain admin and domain user """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Check if 'allow.user.create.projects' configuration is true # 2. Create a Project as domain admin # 3. Create a Project as domain user # 4. In both 2 and 3 project creation should be successful - configs = Configurations.list( self.apiclient, name='allow.user.create.projects' @@ -264,13 +263,12 @@ class TestUserProjectCreation(cloudstackTestCase): def test_02_user_project_creation(self): """Test create project as a domain admin and domain user """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Check if 'allow.user.create.projects' configuration is false # 2. Create a Project as domain admin. Project creation should be # successful. # 3. Create a Project as domain user. Project creation should fail - configs = Configurations.list( self.apiclient, name='allow.user.create.projects' @@ -390,7 +388,7 @@ class TestProjectInviteRequired(cloudstackTestCase): def test_03_add_user_to_project(self): """Add user to project when 'project.invite.required' is false""" - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following: # 1. Create a Project # 2. Add users to the project. Verify user is added to project @@ -490,12 +488,12 @@ class TestProjectInviteRequired(cloudstackTestCase): def test_04_add_user_to_project(self): """Add user to project when 'project.invite.required' is true""" - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following: # 1. Create a Project # 2. Add users to the project. verify user is shown in pending state - # Verify 'project.invite.required' is set to false + # Verify 'project.invite.required' is set to false configs = Configurations.list( self.apiclient, name='project.invite.required' @@ -589,7 +587,7 @@ class TestProjectInviteRequired(cloudstackTestCase): def test_05_invitation_timeout(self): """Test global config project invitation timeout""" - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following: # 1. Set configuration to 5 mins # 2. Create a Project @@ -730,7 +728,7 @@ class TestProjectInviteRequired(cloudstackTestCase): def test_06_invitation_timeout_after_expiry(self): """Test global config project invitation timeout""" - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following: # 1. Set configuration to 5 mins # 2. Create a Project @@ -876,7 +874,7 @@ class TestProjectInviteRequired(cloudstackTestCase): def test_07_invite_after_expiry(self): """Test global config project invitation timeout""" - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following: # 1. Set configuration to 5 mins # 2. Create a Project @@ -1021,7 +1019,7 @@ class TestProjectInviteRequired(cloudstackTestCase): def test_08_decline_invitation(self): """Test decline invitation""" - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following: # 1. Set configuration to 5 mins # 2. Create a Project @@ -1148,7 +1146,7 @@ class TestProjectInviteRequired(cloudstackTestCase): @unittest.skip("Requires SMPT configs") def test_09_invite_to_project_by_email(self): """Test invite user to project by email""" - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following: # 1. Set configuration to 5 mins # 2. Create a Project @@ -1157,7 +1155,7 @@ class TestProjectInviteRequired(cloudstackTestCase): # 5. Verify invitation is rejected and user doesn't become regular # user. - # Verify 'project.invite.required' is set to false + # Verify 'project.invite.required' is set to false configs = Configurations.list( self.apiclient, name='project.invite.timeout' diff --git a/test/integration/component/test_project_limits.py b/test/integration/component/test_project_limits.py index c69cc3238fc..d1735fdfc4b 100644 --- a/test/integration/component/test_project_limits.py +++ b/test/integration/component/test_project_limits.py @@ -154,7 +154,7 @@ class TestProjectLimits(cloudstackTestCase): def test_01_project_limits(self): """ Test project limits """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a Project. Verify once projects are created, they inherit # a default set of resource limits as configured by the Cloud Stack @@ -169,7 +169,7 @@ class TestProjectLimits(cloudstackTestCase): # 4. Create Resource more than its set limit for a project. Verify # resource allocation should fail giving proper message - # Create project as a domain admin + # Create project as a domain admin project = Project.create( self.apiclient, self.services["project"], @@ -301,7 +301,7 @@ class TestProjectLimits(cloudstackTestCase): def test_02_project_limits_normal_user(self): """ Test project limits """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a Project # 2. Reduce the projects limits as a domain admin. Verify resource @@ -524,7 +524,7 @@ class TestResourceLimitsProject(cloudstackTestCase): def test_03_vm_per_project(self): """Test VM limit per project """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Set max VM per project to 2 # 2. Create account and start 2 VMs. Verify VM state is Up and Running @@ -586,7 +586,7 @@ class TestResourceLimitsProject(cloudstackTestCase): def test_04_publicip_per_project(self): """Test Public IP limit per project """ - + tags = ["advanced","eip","advancedns"] # Validate the following # 1. set max no of IPs per project to 2. # 2. Create an account in this domain @@ -671,7 +671,7 @@ class TestResourceLimitsProject(cloudstackTestCase): def test_05_snapshots_per_project(self): """Test Snapshot limit per project """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. set max no of snapshots per project to 1. # 2. Create one snapshot in the project. Snapshot should be @@ -748,7 +748,7 @@ class TestResourceLimitsProject(cloudstackTestCase): def test_06_volumes_per_project(self): """Test Volumes limit per project """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. set max no of volume per project to 1. # 2. Create 1 VM in this project @@ -797,7 +797,7 @@ class TestResourceLimitsProject(cloudstackTestCase): def test_07_templates_per_project(self): """Test Templates limit per project """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. set max no of templates per project to 1. # 2. Create a template in this project. Both template should be in diff --git a/test/integration/component/test_project_resources.py b/test/integration/component/test_project_resources.py index a98f860a67b..131508679e6 100644 --- a/test/integration/component/test_project_resources.py +++ b/test/integration/component/test_project_resources.py @@ -205,7 +205,7 @@ class TestOfferings(cloudstackTestCase): def test_01_service_offerings(self): """ Test service offerings in a project """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a project. # 2. List service offerings for the project. All SO available in the @@ -247,7 +247,7 @@ class TestOfferings(cloudstackTestCase): def test_02_project_disk_offerings(self): """ Test project disk offerings """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a project. # 2. List service offerings for the project. All disk offerings @@ -379,7 +379,7 @@ class TestNetwork(cloudstackTestCase): def test_03_network_create(self): """ Test create network in project """ - + tags = ["advanced", "advancedns"] # Validate the following # 1. Create a project. # 2. Add virtual/direct network resource to the project. User shared @@ -583,7 +583,7 @@ class TestTemplates(cloudstackTestCase): def test_04_public_template_use_in_project(self): """Test Templates creation in projects """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a project # 2. Verify Public templates can be used without any restriction @@ -642,7 +642,7 @@ class TestTemplates(cloudstackTestCase): def test_05_use_private_template_in_project(self): """Test use of private template in a project """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a project # 2. Verify that in order to use somebody’s Private template for vm @@ -808,7 +808,7 @@ class TestSnapshots(cloudstackTestCase): def test_06_create_snapshots_in_project(self): """Test create snapshots in project """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a project # 2. Add some snapshots to the project @@ -961,7 +961,7 @@ class TestPublicIpAddress(cloudstackTestCase): def test_07_associate_public_ip(self): """Test associate public IP within the project """ - + tags = ["advanced", "eip", "advancedns"] # Validate the following # 1. Create a project # 2. Add some public Ips to the project @@ -1237,7 +1237,7 @@ class TestSecurityGroup(cloudstackTestCase): def test_08_security_group(self): """Test security groups in project """ - + tags = ["sg", "eip"] # Validate the following: # 1. Create a project # 2. Assign some security groups to that project diff --git a/test/integration/component/test_project_usage.py b/test/integration/component/test_project_usage.py index bbf6205c3a2..177287dbd1e 100644 --- a/test/integration/component/test_project_usage.py +++ b/test/integration/component/test_project_usage.py @@ -190,7 +190,7 @@ class TestVmUsage(cloudstackTestCase): def test_01_vm_usage(self): """Test Create/Destroy VM and verify usage calculation """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a VM. Verify usage_events table contains VM .create, # VM.start , Network.offering.assign , Volume.create events @@ -401,7 +401,7 @@ class TestPublicIPUsage(cloudstackTestCase): def test_01_public_ip_usage(self): """Test Assign new IP and verify usage calculation """ - + tags = ["advanced", "eip", "advancedns"] # Validate the following # 1. Acquire a IP for the network of this account. Verify usage_event # table has Acquire IP event for the IP for this account @@ -559,7 +559,7 @@ class TestVolumeUsage(cloudstackTestCase): def test_01_volume_usage(self): """Test Create/delete a volume and verify correct usage is recorded """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Volume.create event for both root and data disk is there for the # created account in cloud.usage_event table @@ -751,7 +751,7 @@ class TestTemplateUsage(cloudstackTestCase): """Test Upload/ delete a template and verify correct usage is generated for the template uploaded """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a account # 2. Upload a template from this account. template.create event is @@ -902,7 +902,7 @@ class TestISOUsage(cloudstackTestCase): def test_01_ISO_usage(self): """Test Create/Delete a ISO and verify its usage is generated correctly """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a account # 2. Upload a ISO from this account. ISO.create event is recorded in @@ -1074,7 +1074,7 @@ class TestLBRuleUsage(cloudstackTestCase): def test_01_lb_usage(self): """Test Create/Delete a LB rule and verify correct usage is recorded """ - + tags = ["advanced", "eip", "advancedns"] # Validate the following # 1. Acquire a IP for this account. lb.rule.create event is registered # for this account in cloud.usage_event table @@ -1241,7 +1241,7 @@ class TestSnapshotUsage(cloudstackTestCase): """Test Create/Delete a manual snap shot and verify correct usage is recorded """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create snapshot of the root disk for this account.Snapshot.create # event is there for the created account in cloud.usage_event table @@ -1432,7 +1432,7 @@ class TestNatRuleUsage(cloudstackTestCase): def test_01_nat_usage(self): """Test Create/Delete a PF rule and verify correct usage is recorded """ - + tags = ["advanced", "advancedns"] # Validate the following # 1. Acquire a IP for this account # 2. Create a PF rule on the IP associated with this account. @@ -1615,7 +1615,7 @@ class TestVpnUsage(cloudstackTestCase): def test_01_vpn_usage(self): """Test Create/Delete a VPN and verify correct usage is recorded """ - + tags = ["advanced", "advancedns"] # Validate the following # 1. Enable VPN for this IP. vpn.add.user event is registered for this # account in cloud.usage_event table diff --git a/test/integration/component/test_projects.py b/test/integration/component/test_projects.py index fd195436905..c1d00d90e9f 100644 --- a/test/integration/component/test_projects.py +++ b/test/integration/component/test_projects.py @@ -158,7 +158,7 @@ class TestMultipleProjectCreation(cloudstackTestCase): """ Verify an account can own multiple projects and can belong to multiple projects """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create multiple project. Verify at step 1 An account is allowed # to create multiple projects @@ -380,7 +380,7 @@ class TestCrossDomainAccountAdd(cloudstackTestCase): def test_02_cross_domain_account_add(self): """ Verify No cross domain projects """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a project in a domain. # 2. Add different domain account to the project. Add account should @@ -507,7 +507,7 @@ class TestDeleteAccountWithProject(cloudstackTestCase): def test_03_delete_account_with_project(self): """ Test As long as the project exists, its owner can't be removed """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a project. # 2. Delete account who is owner of the project. Delete account should @@ -627,7 +627,7 @@ class TestDeleteDomainWithProject(cloudstackTestCase): """ Test Verify delete domain with cleanup=true should delete projects belonging to the domain """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a project in a domain # 2. Delete domain forcefully. Verify that project is also deleted as @@ -779,7 +779,7 @@ class TestProjectOwners(cloudstackTestCase): """ Test Verify a project user can be later promoted to become a owner """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a project. # 2. Add account to the project. Edit account to make it a project @@ -937,7 +937,7 @@ class TestProjectOwners(cloudstackTestCase): def test_06_max_one_project_owner(self): """ Test Verify there can only be one owner of a project at a time """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a project. # 2. Add account to the project. Edit account to make it a project @@ -1235,7 +1235,7 @@ class TestProjectResources(cloudstackTestCase): """ Test Verify after an account is removed from the project, all his resources stay with the project. """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a project. # 2. Add some accounts to project. Add resources to the project @@ -1367,7 +1367,7 @@ class TestProjectResources(cloudstackTestCase): def test_08_cleanup_after_project_delete(self): """ Test accounts are unassigned from project after project deletion """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a project. # 2. Add some accounts to project. Add resources to the project @@ -1589,7 +1589,7 @@ class TestProjectSuspendActivate(cloudstackTestCase): """ Test Verify after an account is removed from the project, all his resources stay with the project. """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a project. # 2. Add some accounts to project. Add resources to the project @@ -1742,7 +1742,7 @@ class TestProjectSuspendActivate(cloudstackTestCase): def test_10_project_activation(self): """ Test project activation after suspension """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Activate the project # 2. Verify project is activated and we are able to add resources diff --git a/test/integration/component/test_usage.py b/test/integration/component/test_usage.py index 1e37abda194..4f61d6ba1d9 100644 --- a/test/integration/component/test_usage.py +++ b/test/integration/component/test_usage.py @@ -176,7 +176,7 @@ class TestVmUsage(cloudstackTestCase): def test_01_vm_usage(self): """Test Create/Destroy VM and verify usage calculation """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a VM. Verify usage_events table contains VM .create, # VM.start , Network.offering.assign , Volume.create events @@ -367,7 +367,7 @@ class TestPublicIPUsage(cloudstackTestCase): def test_01_public_ip_usage(self): """Test Assign new IP and verify usage calculation """ - + tags = ["advanced", "eip", "advancedns"] # Validate the following # 1. Aquire a IP for the network of this account. Verify usage_event # table has Acquire IP event for the IP for this account @@ -514,7 +514,7 @@ class TestVolumeUsage(cloudstackTestCase): def test_01_volume_usage(self): """Test Create/delete a volume and verify correct usage is recorded """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Volume.create event for both root and data disk is there for the # created account in cloud.usage_event table @@ -696,7 +696,7 @@ class TestTemplateUsage(cloudstackTestCase): """Test Upload/ delete a template and verify correct usage is generated for the template uploaded """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a account # 2. Upload a template from this account. template.create event is @@ -838,7 +838,7 @@ class TestISOUsage(cloudstackTestCase): def test_01_ISO_usage(self): """Test Create/Delete a ISO and verify its usage is generated correctly """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create a account # 2. Upload a ISO from this account. ISO.create event is recorded in @@ -989,7 +989,7 @@ class TestLBRuleUsage(cloudstackTestCase): def test_01_lb_usage(self): """Test Create/Delete a LB rule and verify correct usage is recorded """ - + tags = ["advanced", "eip", "advancedns"] # Validate the following # 1. Acquire a IP for this account. lb.rule.create event is registered # for this account in cloud.usage_event table @@ -1145,7 +1145,7 @@ class TestSnapshotUsage(cloudstackTestCase): """Test Create/Delete a manual snap shot and verify correct usage is recorded """ - + tags = ["advanced", "basic", "sg", "eip", "advancedns"] # Validate the following # 1. Create snapshot of the root disk for this account.Snapshot.create # event is there for the created account in cloud.usage_event table @@ -1315,7 +1315,7 @@ class TestNatRuleUsage(cloudstackTestCase): def test_01_nat_usage(self): """Test Create/Delete a PF rule and verify correct usage is recorded """ - + tags = ["advanced", "advancedns"] # Validate the following # 1. Acquire a IP for this account # 2. Create a PF rule on the IP associated with this account. @@ -1477,7 +1477,7 @@ class TestVpnUsage(cloudstackTestCase): def test_01_vpn_usage(self): """Test Create/Delete a VPN and verify correct usage is recorded """ - + tags = ["advanced", "advancedns"] # Validate the following # 1. Enable VPN for this IP. vpn.add.user event is registered for this # account in cloud.usage_event table