You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2013/07/22 19:23:21 UTC
[1/6] git commit: updated refs/heads/4.2 to b44c620
Updated Branches:
refs/heads/4.2 cfc85eb68 -> b44c62085
Minor fixes to the test_accounts
when an account is deleted listAccounts raises an exception.
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3ac0e95f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3ac0e95f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3ac0e95f
Branch: refs/heads/4.2
Commit: 3ac0e95ffb6134f3afd83b9f186e09c3ba299ca8
Parents: 4f22561
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Mon Jul 22 14:48:56 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Jul 22 22:53:08 2013 +0530
----------------------------------------------------------------------
test/integration/component/test_accounts.py | 26 +++++++++---------------
1 file changed, 10 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3ac0e95f/test/integration/component/test_accounts.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_accounts.py b/test/integration/component/test_accounts.py
index 7d0aeb1..b586176 100644
--- a/test/integration/component/test_accounts.py
+++ b/test/integration/component/test_accounts.py
@@ -24,8 +24,7 @@ from marvin.integration.lib.base import *
from marvin.integration.lib.common import *
from marvin import remoteSSHClient
from nose.plugins.attrib import attr
-import datetime
-
+from marvin.cloudstackException import cloudstackAPIException
class Services:
"""Test Account Services
@@ -831,12 +830,12 @@ class TestServiceOfferingHierarchy(cloudstackTestCase):
return
-class TesttemplateHierarchy(cloudstackTestCase):
+class TestTemplateHierarchy(cloudstackTestCase):
@classmethod
def setUpClass(cls):
cls.api_client = super(
- TesttemplateHierarchy,
+ TestTemplateHierarchy,
cls).getClsTestClient().getApiClient()
cls.services = Services().services
# Get Zone settings
@@ -1788,18 +1787,13 @@ class TestDomainForceRemove(cloudstackTestCase):
# Sleep to ensure that all resources are deleted
time.sleep(int(configurations[0].value) * 2)
self.debug("Checking if the resources in domain are deleted or not..")
- accounts = Account.list(
- self.apiclient,
- name=self.account_1.name,
- domainid=self.account_1.domainid,
- listall=True
- )
-
- self.assertEqual(
- accounts,
- None,
- "Account should get automatically deleted after domain removal"
- )
+ with self.assertRaises(cloudstackAPIException):
+ Account.list(
+ self.apiclient,
+ name=self.account_1.name,
+ domainid=self.account_1.domainid,
+ listall=True
+ )
return
@attr(tags=["domains", "advanced", "advancedns", "simulator"])
[3/6] git commit: updated refs/heads/4.2 to b44c620
Posted by ts...@apache.org.
CLOUDSTACK-3075: When only setUpClass() is creating account
Missed scenario for appending test case names to accounts when
setUpClass calls the account.creation integration library.
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a659d789
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a659d789
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a659d789
Branch: refs/heads/4.2
Commit: a659d78905bffebe5c89ce94493b569c192ee3ed
Parents: d0695c1
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Mon Jul 22 14:52:04 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Jul 22 22:53:09 2013 +0530
----------------------------------------------------------------------
tools/marvin/marvin/marvinPlugin.py | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a659d789/tools/marvin/marvin/marvinPlugin.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/marvinPlugin.py b/tools/marvin/marvin/marvinPlugin.py
index ca226f8..8a548cd 100644
--- a/tools/marvin/marvin/marvinPlugin.py
+++ b/tools/marvin/marvin/marvinPlugin.py
@@ -150,6 +150,8 @@ class MarvinPlugin(Plugin):
setattr(test, "testClient", self.testclient)
setattr(test, "config", self.config)
setattr(test, "debug", partial(testCaseLogger, logger=testcaselogger))
+ if self.testclient.identifier is None:
+ self.testclient.identifier = self.identifier
setattr(test, "clstestclient", self.testclient)
if hasattr(test, "user"):
# when the class-level attr applied. all test runs as 'user'
[2/6] git commit: updated refs/heads/4.2 to b44c620
Posted by ts...@apache.org.
CLOUDSTACK-3679: Added subsequent change that was needed after change in try_ssh function
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4f22561f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4f22561f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4f22561f
Branch: refs/heads/4.2
Commit: 4f22561f6991c404c53a5620267067a6f8ddb3a6
Parents: cfc85eb
Author: Gaurav Aradhye <ga...@clogeny.com>
Authored: Sun Jul 21 21:34:12 2013 -0400
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Jul 22 22:53:08 2013 +0530
----------------------------------------------------------------------
test/integration/smoke/test_loadbalance.py | 54 ++++++++++++-------------
1 file changed, 27 insertions(+), 27 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f22561f/test/integration/smoke/test_loadbalance.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_loadbalance.py b/test/integration/smoke/test_loadbalance.py
index 4e1f0c1..f5405da 100644
--- a/test/integration/smoke/test_loadbalance.py
+++ b/test/integration/smoke/test_loadbalance.py
@@ -323,11 +323,11 @@ class TestLoadBalance(cloudstackTestCase):
hostnames = []
- self.try_ssh(src_nat_ip_addr, hostnames)
- self.try_ssh(src_nat_ip_addr, hostnames)
- self.try_ssh(src_nat_ip_addr, hostnames)
- self.try_ssh(src_nat_ip_addr, hostnames)
- self.try_ssh(src_nat_ip_addr, hostnames)
+ self.try_ssh(src_nat_ip_addr.ipaddress, hostnames)
+ self.try_ssh(src_nat_ip_addr.ipaddress, hostnames)
+ self.try_ssh(src_nat_ip_addr.ipaddress, hostnames)
+ self.try_ssh(src_nat_ip_addr.ipaddress, hostnames)
+ self.try_ssh(src_nat_ip_addr.ipaddress, hostnames)
self.debug("Hostnames: %s" % str(hostnames))
self.assertIn(
@@ -354,7 +354,7 @@ class TestLoadBalance(cloudstackTestCase):
self.vm_2.id
))
- self.try_ssh(src_nat_ip_addr, hostnames)
+ self.try_ssh(src_nat_ip_addr.ipaddress, hostnames)
self.assertIn(
self.vm_1.name,
hostnames,
@@ -368,7 +368,7 @@ class TestLoadBalance(cloudstackTestCase):
with self.assertRaises(Exception):
self.debug("Removed all VMs, trying to SSH")
- self.try_ssh(src_nat_ip_addr, hostnames)
+ self.try_ssh(src_nat_ip_addr.ipaddress, hostnames)
return
@attr(tags = ["advanced", "advancedns", "smoke"])
@@ -440,11 +440,11 @@ class TestLoadBalance(cloudstackTestCase):
)
try:
hostnames = []
- self.try_ssh(self.non_src_nat_ip.ipaddress, hostnames)
- self.try_ssh(self.non_src_nat_ip.ipaddress, hostnames)
- self.try_ssh(self.non_src_nat_ip.ipaddress, hostnames)
- self.try_ssh(self.non_src_nat_ip.ipaddress, hostnames)
- self.try_ssh(self.non_src_nat_ip.ipaddress, hostnames)
+ self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames)
+ self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames)
+ self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames)
+ self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames)
+ self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames)
self.debug("Hostnames: %s" % str(hostnames))
self.assertIn(
@@ -468,7 +468,7 @@ class TestLoadBalance(cloudstackTestCase):
# Making host list empty
hostnames[:] = []
- self.try_ssh(self.non_src_nat_ip.ipaddress, hostnames)
+ self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames)
self.assertIn(
self.vm_1.name,
hostnames,
@@ -486,7 +486,7 @@ class TestLoadBalance(cloudstackTestCase):
self.non_src_nat_ip.ipaddress.ipaddress,
self.vm_1.id
))
- self.try_ssh(self.non_src_nat_ip, hostnames)
+ self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames)
return
@attr(tags = ["advanced", "advancedns", "smoke"])
@@ -535,11 +535,11 @@ class TestLoadBalance(cloudstackTestCase):
lb_rule.assign(self.apiclient, [self.vm_1, self.vm_2])
hostnames = []
- self.try_ssh(self.non_src_nat_ip.ipaddress, hostnames)
- self.try_ssh(self.non_src_nat_ip.ipaddress, hostnames)
- self.try_ssh(self.non_src_nat_ip.ipaddress, hostnames)
- self.try_ssh(self.non_src_nat_ip.ipaddress, hostnames)
- self.try_ssh(self.non_src_nat_ip.ipaddress, hostnames)
+ self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames)
+ self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames)
+ self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames)
+ self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames)
+ self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames)
self.debug("Hostnames: %s" % str(hostnames))
self.assertIn(
@@ -561,10 +561,10 @@ class TestLoadBalance(cloudstackTestCase):
try:
self.debug("SSHing again into IP address: %s with VM (ID: %s) added to LB rule" %
(
- self.non_src_nat_ip.ipaddress,
+ self.non_src_nat_ip.ipaddress.ipaddress,
self.vm_1.id,
))
- self.try_ssh(self.non_src_nat_ip.ipaddress, hostnames)
+ self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames)
self.assertIn(
self.vm_1.name,
@@ -573,17 +573,17 @@ class TestLoadBalance(cloudstackTestCase):
)
except Exception as e:
self.fail("SSH failed for VM with IP: %s" %
- self.non_src_nat_ip.ipaddress)
+ self.non_src_nat_ip.ipaddress.ipaddress)
lb_rule.assign(self.apiclient, [self.vm_3])
# # Making hostnames list empty
hostnames[:] = []
- self.try_ssh(self.non_src_nat_ip.ipaddress, hostnames)
- self.try_ssh(self.non_src_nat_ip.ipaddress, hostnames)
- self.try_ssh(self.non_src_nat_ip.ipaddress, hostnames)
- self.try_ssh(self.non_src_nat_ip.ipaddress, hostnames)
- self.try_ssh(self.non_src_nat_ip.ipaddress, hostnames)
+ self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames)
+ self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames)
+ self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames)
+ self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames)
+ self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames)
self.debug("Hostnames: %s" % str(hostnames))
self.assertIn(
self.vm_1.name,
[5/6] git commit: updated refs/heads/4.2 to b44c620
Posted by ts...@apache.org.
CLOUDSTACK-3610: Fix regression test "test_accounts.TestUserLogin"
Now password is sent as clear text as per CLOUDSTACK-1734
So changed marvin to handle this. Plus domainid was not
passed in the testcase and marvin used "domainid" instead of
"domainId" as a parameter. Fixed these two errors.
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b44c6208
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b44c6208
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b44c6208
Branch: refs/heads/4.2
Commit: b44c6208506791c4af6363f7471b1c367d37cc1a
Parents: 7d6c091
Author: Girish Shilamkar <gi...@clogeny.com>
Authored: Mon Jul 22 19:13:11 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Jul 22 22:53:09 2013 +0530
----------------------------------------------------------------------
test/integration/component/test_accounts.py | 5 ++---
tools/marvin/marvin/integration/lib/base.py | 12 +++---------
2 files changed, 5 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b44c6208/test/integration/component/test_accounts.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_accounts.py b/test/integration/component/test_accounts.py
index b586176..3c284bd 100644
--- a/test/integration/component/test_accounts.py
+++ b/test/integration/component/test_accounts.py
@@ -1559,9 +1559,8 @@ class TestUserLogin(cloudstackTestCase):
respose = User.login(
self.apiclient,
username=self.account.name,
- password=self.services["account"]["password"]
- )
- self.assertEqual(respose, None, "Login response should not be none")
+ password=self.services["account"]["password"],
+ domainid=domain.id)
self.debug("Login API response: %s" % respose)
self.assertNotEqual(
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b44c6208/tools/marvin/marvin/integration/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base.py b/tools/marvin/marvin/integration/lib/base.py
index 00dc506..6e49ae5 100755
--- a/tools/marvin/marvin/integration/lib/base.py
+++ b/tools/marvin/marvin/integration/lib/base.py
@@ -148,10 +148,7 @@ class User:
if "userUUID" in services:
cmd.userid = "-".join([services["userUUID"],random_gen()])
- # Password Encoding
- mdf = hashlib.md5()
- mdf.update(services["password"])
- cmd.password = mdf.hexdigest()
+ cmd.password = services["password"]
cmd.username = "-".join([services["username"], random_gen()])
user = apiclient.createUser(cmd)
@@ -201,14 +198,11 @@ class User:
cmd = login.loginCmd()
cmd.username = username
- # MD5 hashcoded password
- mdf = hashlib.md5()
- mdf.update(password)
- cmd.password = mdf.hexdigest()
+ cmd.password = password
if domain:
cmd.domain = domain
if domainid:
- cmd.domainid = domainid
+ cmd.domainId = domainid
return apiclient.login(cmd)
[4/6] git commit: updated refs/heads/4.2 to b44c620
Posted by ts...@apache.org.
CLOUDSTACK-3695: test_add_user_to_project failed with missing attribute "email".
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
(cherry picked from commit 983b7c62a464af94aabf0686671c986025a19788)
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7d6c091c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7d6c091c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7d6c091c
Branch: refs/heads/4.2
Commit: 7d6c091c05420582d833be7d5eecd58c69b62e39
Parents: a659d78
Author: Sanjay Tripathi <sa...@citrix.com>
Authored: Mon Jul 22 14:32:25 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Jul 22 22:53:09 2013 +0530
----------------------------------------------------------------------
test/integration/component/test_project_configs.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7d6c091c/test/integration/component/test_project_configs.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_project_configs.py b/test/integration/component/test_project_configs.py
index 6416497..a9654c8 100644
--- a/test/integration/component/test_project_configs.py
+++ b/test/integration/component/test_project_configs.py
@@ -537,7 +537,7 @@ class TestProjectInviteRequired(cloudstackTestCase):
project.addAccount(
self.apiclient,
self.user.name,
- self.user.email
+ self.user.user[0].email
)
# listProjectAccount to verify the user is added to project or not
@@ -690,7 +690,7 @@ class TestProjectInviteRequiredTrue(cloudstackTestCase):
project.addAccount(
self.apiclient,
self.user.name,
- self.user.email
+ self.user.user[0].email
)
# listProjectAccount to verify the user is added to project or not
@@ -859,7 +859,7 @@ class TestProjectInviteTimeout(cloudstackTestCase):
project.addAccount(
self.apiclient,
self.user.name,
- self.user.email
+ self.user.user[0].email
)
# listProjectAccount to verify the user is added to project or not
[6/6] git commit: updated refs/heads/4.2 to b44c620
Posted by ts...@apache.org.
CLOUDSTACK-3672: Multiple minor fixes to tags tests
- SourceHost is an id
- Invalid format in debug() message corrected
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d0695c1f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d0695c1f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d0695c1f
Branch: refs/heads/4.2
Commit: d0695c1ffcf2bc45d7963b5ff833d977a76fd31d
Parents: 3ac0e95
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Mon Jul 22 14:50:45 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Jul 22 22:53:09 2013 +0530
----------------------------------------------------------------------
test/integration/component/test_tags.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d0695c1f/test/integration/component/test_tags.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_tags.py b/test/integration/component/test_tags.py
index 52df6da..f10641b 100644
--- a/test/integration/component/test_tags.py
+++ b/test/integration/component/test_tags.py
@@ -1083,12 +1083,12 @@ class TestResourceTags(cloudstackTestCase):
'CentOS',
'The tag should have original value'
)
-
isos = Iso.list(
self.apiclient,
- listall=True,
key='OS',
- value='CentOS'
+ value='CentOS',
+ account=self.account.name,
+ domainid=self.account.domainid
)
self.assertEqual(
@@ -1096,7 +1096,7 @@ class TestResourceTags(cloudstackTestCase):
True,
"List isos should not return an empty response"
)
-
+
self.debug("Deleting the created tag..")
try:
tag.delete(
@@ -1454,14 +1454,14 @@ class TestResourceTags(cloudstackTestCase):
self.debug("Available hosts: ")
for host in hosts:
- self.debug("Host: %s", host.id)
+ self.debug("Host: %s" % host.id)
# Filtering out the source host from list host response
temp_hosts = [host for host in hosts if host.id != source_host]
dest_host = temp_hosts[0]
self.debug("Destination host is: %s" % dest_host.id)
- self.debug("Source host is: %s" % source_host.id)
+ self.debug("Source host is: %s" % source_host)
self.debug("Creating a tag for user VM")
tag = Tag.create(