This is an automated email from the ASF dual-hosted git repository. bhaisaab pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 899c5c784dfdfc7ba7245aa729c644b905e729ba Author: Boris <bss.stoya...@gmail.com> AuthorDate: Mon Jul 24 17:54:41 2017 +0300 CLOUDSTACK-10014: fix components/test_accounts.py test_user_key_renew_same_account: use new api getUserKeys to get secrett key --- test/integration/component/test_accounts.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/integration/component/test_accounts.py b/test/integration/component/test_accounts.py index 714680b..a64d922 100644 --- a/test/integration/component/test_accounts.py +++ b/test/integration/component/test_accounts.py @@ -20,6 +20,7 @@ from marvin.cloudstackTestCase import cloudstackTestCase from marvin.lib.utils import (random_gen, cleanup_resources) +from marvin.cloudstackAPI import * from marvin.lib.base import (Domain, Account, ServiceOffering, @@ -43,6 +44,8 @@ from nose.plugins.attrib import attr from marvin.cloudstackException import CloudstackAPIException import time +from pyVmomi.VmomiSupport import GetVersionFromVersionUri + class Services: @@ -1653,6 +1656,11 @@ class TestUserAPIKeys(cloudstackTestCase): user.apikey, userkeys.apikey, "Check User api key") + user.secretkey = self.get_secret_key(user.id) + self.assertEqual( + user.secretkey, + userkeys.secretkey, + "Check User having secret key") self.debug("Get test client with user keys") cs_api = self.testClient.getUserApiClient( @@ -1664,6 +1672,17 @@ class TestUserAPIKeys(cloudstackTestCase): userkeys.apikey, new_keys.apikey, "Check API key is different") + new_keys.secretkey = self.get_secret_key(user_1.id) + self.assertNotEqual( + userkeys.secretkey, + new_keys.secretkey, + "Check secret key is different") + + def get_secret_key(self, id): + cmd = getUserKeys.getUserKeysCmd() + cmd.id = id + keypair = self.apiclient.getUserKeys(cmd) + return keypair.secretkey @attr(tags=[ "role", @@ -2062,3 +2081,4 @@ class TestDomainForceRemove(cloudstackTestCase): with self.assertRaises(Exception): domain.delete(self.apiclient, cleanup=False) return + -- To stop receiving notification emails like this one, please contact "commits@cloudstack.apache.org" <commits@cloudstack.apache.org>.