cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [6/6] git commit: updated refs/heads/master to 18fbbcf
Date Mon, 22 Jul 2013 17:22:59 GMT
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 <tsp@apache.org>
(cherry picked from commit dba09791fc99c342974d8ca1c69609c04f1a5512)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/18fbbcfc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/18fbbcfc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/18fbbcfc

Branch: refs/heads/master
Commit: 18fbbcfc5a3bea98576cc819a37b00b227616cae
Parents: 95e1f63
Author: Girish Shilamkar <girish@clogeny.com>
Authored: Mon Jul 22 19:13:11 2013 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Mon Jul 22 19:36:28 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/18fbbcfc/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/18fbbcfc/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)
 
 


Mime
View raw message