Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions test/integration/component/test_accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -43,6 +44,8 @@
from marvin.cloudstackException import CloudstackAPIException
import time

from pyVmomi.VmomiSupport import GetVersionFromVersionUri


class Services:

Expand Down Expand Up @@ -1649,6 +1652,7 @@ def test_user_key_renew_same_account(self):
user.apikey,
userkeys.apikey,
"Check User api key")
user.secretkey = self.get_secret_key(user.id)
self.assertEqual(
user.secretkey,
userkeys.secretkey,
Expand All @@ -1664,11 +1668,18 @@ def test_user_key_renew_same_account(self):
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",
"accounts",
Expand Down Expand Up @@ -2066,3 +2077,4 @@ def test_DeleteDomain(self):
with self.assertRaises(Exception):
domain.delete(self.apiclient, cleanup=False)
return