cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [1/4] git commit: updated refs/heads/4.2 to 6a185e2
Date Wed, 17 Jul 2013 13:57:46 GMT
Updated Branches:
  refs/heads/4.2 50b5ba645 -> 6a185e293


CLOUDSTACK-3592: Fix project email reference.

Emails belong to user's within accounts. Refer to the first user within
the account and use his email for account invites.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit 22cb5be8b6e38fb9e27f86e264c6438e10192311)


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

Branch: refs/heads/4.2
Commit: 6a185e2939649fe45219598dfb779cb6120cb7fa
Parents: 8e7c1aa
Author: Prasanna Santhanam <tsp@apache.org>
Authored: Wed Jul 17 19:22:58 2013 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Wed Jul 17 19:27:33 2013 +0530

----------------------------------------------------------------------
 test/integration/component/test_projects.py | 28 ++++++++++++++----------
 1 file changed, 16 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a185e29/test/integration/component/test_projects.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_projects.py b/test/integration/component/test_projects.py
index 5f37f96..39e9bee 100644
--- a/test/integration/component/test_projects.py
+++ b/test/integration/component/test_projects.py
@@ -170,8 +170,7 @@ class TestMultipleProjectCreation(cloudstackTestCase):
 
     @attr(tags = ["advanced", "basic", "sg", "eip", "advancedns", "simulator"])
     def test_01_create_multiple_projects_by_account(self):
-        """ Verify an account can own multiple projects and can belong to
-            multiple projects
+        """ Verify an account can own multiple projects and can belong to multiple projects
         """
         # Validate the following
         # 1. Create multiple project. Verify at step 1 An account is allowed
@@ -245,22 +244,27 @@ class TestMultipleProjectCreation(cloudstackTestCase):
                         "Check list project response returns a valid project"
                         )
 
+        self.assert_(isinstance(self.user.user, list))
+        self.assert_(len(self.user.user) > 0, msg="Account %s has no users" % self.user.name)
+        self.debug("Adding account %s to project with email %s" % (self.user.name, self.user.user[0].email))
+        email = self.user.user[0].email
+
         # Add user to the project
         project_1.addAccount(
                            self.apiclient,
                            self.user.name,
-                           self.user.email
+                           email
                            )
 
         # listProjectAccount to verify the user is added to project or not
-        accounts_reponse = Project.listAccounts(
+        accounts_response = Project.listAccounts(
                                             self.apiclient,
                                             projectid=project_1.id,
                                             account=self.user.name,
                                             )
-        self.debug(accounts_reponse)
+        self.debug(accounts_response)
         self.assertEqual(
-                            isinstance(accounts_reponse, list),
+                            isinstance(accounts_response, list),
                             True,
                             "Check for a valid list accounts response"
                             )
@@ -270,7 +274,7 @@ class TestMultipleProjectCreation(cloudstackTestCase):
                     0,
                     "Check list project response returns a valid project"
                     )
-        account = accounts_reponse[0]
+        account = accounts_response[0]
 
         self.assertEqual(
                             account.role,
@@ -281,18 +285,18 @@ class TestMultipleProjectCreation(cloudstackTestCase):
         project_2.addAccount(
                            self.apiclient,
                            self.user.name,
-                           self.user.email
+                           email
                            )
 
         # listProjectAccount to verify the user is added to project or not
-        accounts_reponse = Project.listAccounts(
+        accounts_response = Project.listAccounts(
                                             self.apiclient,
                                             projectid=project_2.id,
                                             account=self.user.name,
                                             )
-        self.debug(accounts_reponse)
+        self.debug(accounts_response)
         self.assertEqual(
-                            isinstance(accounts_reponse, list),
+                            isinstance(accounts_response, list),
                             True,
                             "Check for a valid list accounts response"
                             )
@@ -302,7 +306,7 @@ class TestMultipleProjectCreation(cloudstackTestCase):
                     0,
                     "Check list project response returns a valid project"
                     )
-        account = accounts_reponse[0]
+        account = accounts_response[0]
 
         self.assertEqual(
                             account.role,


Mime
View raw message