Repository: cloudstack Updated Branches: refs/heads/master 3d369de6f -> b43d9345e
CLOUDSTACK-7431: moved ldap configuration details to test_data.py Signed-off-by: SrikanteswaraRao Talluri <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b43d9345 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b43d9345 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b43d9345 Branch: refs/heads/master Commit: b43d9345e9716613a1b04dfaa5f50fb90caab889 Parents: 3d369de Author: SrikanteswaraRao Talluri <[email protected]> Authored: Thu Sep 4 17:38:42 2014 +0530 Committer: SrikanteswaraRao Talluri <[email protected]> Committed: Thu Sep 4 17:38:42 2014 +0530 ---------------------------------------------------------------------- test/integration/component/test_ldap.py | 51 ++++++---------------------- tools/marvin/marvin/config/test_data.py | 20 ++++++++++- 2 files changed, 29 insertions(+), 42 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b43d9345/test/integration/component/test_ldap.py ---------------------------------------------------------------------- diff --git a/test/integration/component/test_ldap.py b/test/integration/component/test_ldap.py index 647e5b5..5a78957 100644 --- a/test/integration/component/test_ldap.py +++ b/test/integration/component/test_ldap.py @@ -35,35 +35,6 @@ from marvin.lib.common import * from nose.plugins.attrib import attr import urllib - - -class Services: - """Test LDAP Configuration - """ - - def __init__(self): - self.services = { - "account": { - "email": "[email protected]", - "firstname": "Ryan", - "lastname": "Murphy", - "username": "rmurphy", - "password": "internalcloudstackpassword", - }, - "ldapConfiguration_1": - { - "basedn": "dc=cloudstack,dc=org", - "emailAttribute": "mail", - "userObject": "inetOrgPerson", - "usernameAttribute": "uid", - "hostname": "localhost", - "port": "10389", - "ldapUsername": "rmurphy", - "ldapPassword": "password" - } - } - - class TestLdap(cloudstackTestCase): """ This tests attempts to register a LDAP server and authenticate as an LDAP user. @@ -72,12 +43,10 @@ class TestLdap(cloudstackTestCase): @classmethod def setUpClass(cls): - cls.api_client = super( - TestLdap, - cls - ).getClsTestClient().getApiClient() - cls.services = Services().services - cls.account = cls.services["account"] + testClient = super(TestLdap, cls).getClsTestClient() + cls.api_client = testClient.getApiClient() + cls.services = testClient.getParsedTestDataConfig() + cls.account = cls.services["ldap_account"] cls._cleanup = [] @@ -97,12 +66,12 @@ class TestLdap(cloudstackTestCase): self.acct = createAccount.createAccountCmd() self.acct.accounttype = 0 - self.acct.firstname = self.services["account"]["firstname"] - self.acct.lastname = self.services["account"]["lastname"] - self.acct.password = self.services["account"]["password"] - self.acct.username = self.services["account"]["username"] - self.acct.email = self.services["account"]["email"] - self.acct.account = self.services["account"]["username"] + self.acct.firstname = self.services["ldap_account"]["firstname"] + self.acct.lastname = self.services["ldap_account"]["lastname"] + self.acct.password = self.services["ldap_account"]["password"] + self.acct.username = self.services["ldap_account"]["username"] + self.acct.email = self.services["ldap_account"]["email"] + self.acct.account = self.services["ldap_account"]["username"] self.acct.domainid = 1 self.acctRes = self.apiClient.createAccount(self.acct) http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b43d9345/tools/marvin/marvin/config/test_data.py ---------------------------------------------------------------------- diff --git a/tools/marvin/marvin/config/test_data.py b/tools/marvin/marvin/config/test_data.py index 100f8d2..5dee783 100644 --- a/tools/marvin/marvin/config/test_data.py +++ b/tools/marvin/marvin/config/test_data.py @@ -1234,5 +1234,23 @@ test_data = { }, }, "ostype": 'CentOS 5.6 (64-bit)', - } + }, + "ldap_account": { + "email": "[email protected]", + "firstname": "Ryan", + "lastname": "Murphy", + "username": "rmurphy", + "password": "internalcloudstackpassword", + }, + "ldapConfiguration_1": + { + "basedn": "dc=cloudstack,dc=org", + "emailAttribute": "mail", + "userObject": "inetOrgPerson", + "usernameAttribute": "uid", + "hostname": "localhost", + "port": "10389", + "ldapUsername": "rmurphy", + "ldapPassword": "password" + } }
