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:25 UTC
[5/6] git commit: updated refs/heads/4.2 to b44c620
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)