Sync tempest plugin with latest tempest

Sync our Tempest plugin to latest state of tempest repo because it has
incompatibilities.

Change-Id: I0d62f8a6f11f4bdba25807123e4cc4396a75799d
This commit is contained in:
Valeriy Ponomaryov 2015-05-07 17:09:42 +03:00
parent 112e7979a7
commit 2335afa915
8 changed files with 80 additions and 138 deletions

View File

@ -47,7 +47,7 @@ fi
# Go to Tempest dir and checkout stable commit to avoid possible
# incompatibilities for plugin stored in Manila repo.
TEMPEST_COMMIT="628c965d" # 23 Apr, 2015
TEMPEST_COMMIT="7af67608" # 6 May, 2015
cd $BASE/new/tempest
git checkout $TEMPEST_COMMIT

View File

@ -27,17 +27,12 @@ class SharesAdminQuotasTest(base.BaseSharesAdminTest):
def resource_setup(cls):
cls.os = clients.AdminManager()
super(SharesAdminQuotasTest, cls).resource_setup()
# Get tenant and user
cls.identity_client = cls._get_identity_admin_client()
cls.tenant = cls.identity_client.get_tenant_by_name(
cls.shares_client.auth_params["tenant"])
cls.user = cls.identity_client.get_user_by_username(
cls.tenant["id"], cls.shares_client.auth_params["user"])
cls.user_id = cls.shares_client.user_id
cls.tenant_id = cls.shares_client.tenant_id
@test.attr(type=["gate", "smoke", ])
def test_default_quotas(self):
quotas = self.shares_client.default_quotas(self.tenant["id"])
quotas = self.shares_client.default_quotas(self.tenant_id)
self.assertGreater(int(quotas["gigabytes"]), -2)
self.assertGreater(int(quotas["snapshot_gigabytes"]), -2)
self.assertGreater(int(quotas["shares"]), -2)
@ -46,7 +41,7 @@ class SharesAdminQuotasTest(base.BaseSharesAdminTest):
@test.attr(type=["gate", "smoke", ])
def test_show_quotas(self):
quotas = self.shares_client.show_quotas(self.tenant["id"])
quotas = self.shares_client.show_quotas(self.tenant_id)
self.assertGreater(int(quotas["gigabytes"]), -2)
self.assertGreater(int(quotas["snapshot_gigabytes"]), -2)
self.assertGreater(int(quotas["shares"]), -2)
@ -55,8 +50,7 @@ class SharesAdminQuotasTest(base.BaseSharesAdminTest):
@test.attr(type=["gate", "smoke", ])
def test_show_quotas_for_user(self):
quotas = self.shares_client.show_quotas(
self.tenant["id"], self.user["id"])
quotas = self.shares_client.show_quotas(self.tenant_id, self.user_id)
self.assertGreater(int(quotas["gigabytes"]), -2)
self.assertGreater(int(quotas["snapshot_gigabytes"]), -2)
self.assertGreater(int(quotas["shares"]), -2)
@ -73,12 +67,11 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
# get current quotas
quotas = client.show_quotas(client.creds["tenant"]["id"])
quotas = client.show_quotas(client.tenant_id)
new_quota = int(quotas["shares"]) + 2
# set new quota for shares
updated = client.update_quotas(
client.creds["tenant"]["id"], shares=new_quota)
updated = client.update_quotas(client.tenant_id, shares=new_quota)
self.assertEqual(int(updated["shares"]), new_quota)
@test.attr(type=["gate", "smoke", ])
@ -86,14 +79,12 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
# get current quotas
quotas = client.show_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"])
quotas = client.show_quotas(client.tenant_id, client.user_id)
new_quota = int(quotas["shares"]) - 1
# set new quota for shares
updated = client.update_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"],
shares=new_quota)
client.tenant_id, client.user_id, shares=new_quota)
self.assertEqual(int(updated["shares"]), new_quota)
@test.attr(type=["gate", "smoke", ])
@ -101,12 +92,11 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
# get current quotas
quotas = client.show_quotas(client.creds["tenant"]["id"])
quotas = client.show_quotas(client.tenant_id)
new_quota = int(quotas["snapshots"]) + 2
# set new quota for snapshots
updated = client.update_quotas(
client.creds["tenant"]["id"], snapshots=new_quota)
updated = client.update_quotas(client.tenant_id, snapshots=new_quota)
self.assertEqual(int(updated["snapshots"]), new_quota)
@test.attr(type=["gate", "smoke", ])
@ -114,14 +104,12 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
# get current quotas
quotas = client.show_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"])
quotas = client.show_quotas(client.tenant_id, client.user_id)
new_quota = int(quotas["snapshots"]) - 1
# set new quota for snapshots
updated = client.update_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"],
snapshots=new_quota)
client.tenant_id, client.user_id, snapshots=new_quota)
self.assertEqual(int(updated["snapshots"]), new_quota)
@test.attr(type=["gate", "smoke", ])
@ -129,14 +117,14 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
# get current quotas
custom = client.show_quotas(client.creds["tenant"]["id"])
custom = client.show_quotas(client.tenant_id)
# make quotas for update
gigabytes = int(custom["gigabytes"]) + 2
# set new quota for shares
updated = client.update_quotas(
client.creds["tenant"]["id"], gigabytes=gigabytes)
client.tenant_id, gigabytes=gigabytes)
self.assertEqual(int(updated["gigabytes"]), gigabytes)
@test.attr(type=["gate", "smoke", ])
@ -144,14 +132,14 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
# get current quotas
custom = client.show_quotas(client.creds["tenant"]["id"])
custom = client.show_quotas(client.tenant_id)
# make quotas for update
snapshot_gigabytes = int(custom["snapshot_gigabytes"]) + 2
# set new quota for shares
updated = client.update_quotas(
client.creds["tenant"]["id"],
client.tenant_id,
snapshot_gigabytes=snapshot_gigabytes)
self.assertEqual(
int(updated["snapshot_gigabytes"]), snapshot_gigabytes)
@ -161,15 +149,14 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
# get current quotas
custom = client.show_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"])
custom = client.show_quotas(client.tenant_id, client.user_id)
# make quotas for update
gigabytes = int(custom["gigabytes"]) - 1
# set new quota for shares
updated = client.update_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"],
client.tenant_id, client.user_id,
gigabytes=gigabytes)
self.assertEqual(int(updated["gigabytes"]), gigabytes)
@ -178,15 +165,14 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
# get current quotas
custom = client.show_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"])
custom = client.show_quotas(client.tenant_id, client.user_id)
# make quotas for update
snapshot_gigabytes = int(custom["snapshot_gigabytes"]) - 1
# set new quota for shares
updated = client.update_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"],
client.tenant_id, client.user_id,
snapshot_gigabytes=snapshot_gigabytes)
self.assertEqual(
int(updated["snapshot_gigabytes"]), snapshot_gigabytes)
@ -196,12 +182,12 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
# get current quotas
quotas = client.show_quotas(client.creds["tenant"]["id"])
quotas = client.show_quotas(client.tenant_id)
new_quota = int(quotas["share_networks"]) + 2
# set new quota for share-networks
updated = client.update_quotas(
client.creds["tenant"]["id"], share_networks=new_quota)
client.tenant_id, share_networks=new_quota)
self.assertEqual(int(updated["share_networks"]), new_quota)
@test.attr(type=["gate", "smoke", ])
@ -210,12 +196,12 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
# get current quotas
quotas = client.show_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"])
client.tenant_id, client.user_id)
new_quota = int(quotas["share_networks"]) - 1
# set new quota for share-networks
updated = client.update_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"],
client.tenant_id, client.user_id,
share_networks=new_quota)
self.assertEqual(int(updated["share_networks"]), new_quota)
@ -224,10 +210,10 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
# get default_quotas
default = client.default_quotas(client.creds["tenant"]["id"])
default = client.default_quotas(client.tenant_id)
# get current quotas
custom = client.show_quotas(client.creds["tenant"]["id"])
custom = client.show_quotas(client.tenant_id)
# make quotas for update
shares = int(custom["shares"]) + 2
@ -238,7 +224,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
# set new quota
updated = client.update_quotas(
client.creds["tenant"]["id"],
client.tenant_id,
shares=shares,
snapshots=snapshots,
gigabytes=gigabytes,
@ -252,10 +238,10 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
self.assertEqual(int(updated["share_networks"]), share_networks)
# reset customized quotas
client.reset_quotas(client.creds["tenant"]["id"])
client.reset_quotas(client.tenant_id)
# verify quotas
reseted = client.show_quotas(client.creds["tenant"]["id"])
reseted = client.show_quotas(client.tenant_id)
self.assertEqual(int(reseted["shares"]), int(default["shares"]))
self.assertEqual(int(reseted["snapshots"]), int(default["snapshots"]))
self.assertEqual(int(reseted["gigabytes"]), int(default["gigabytes"]))
@ -265,9 +251,9 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
@test.attr(type=["gate", "smoke", ])
def test_unlimited_quota_for_shares(self):
client = self.get_client_with_isolated_creds()
client.update_quotas(client.creds["tenant"]["id"], shares=-1)
client.update_quotas(client.tenant_id, shares=-1)
quotas = client.show_quotas(client.creds["tenant"]["id"])
quotas = client.show_quotas(client.tenant_id)
self.assertEqual(-1, quotas.get('shares'))
@ -275,20 +261,19 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
def test_unlimited_user_quota_for_shares(self):
client = self.get_client_with_isolated_creds()
client.update_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"],
client.tenant_id, client.user_id,
shares=-1)
quotas = client.show_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"])
quotas = client.show_quotas(client.tenant_id, client.user_id)
self.assertEqual(-1, quotas.get('shares'))
@test.attr(type=["gate", "smoke", ])
def test_unlimited_quota_for_snapshots(self):
client = self.get_client_with_isolated_creds()
client.update_quotas(client.creds["tenant"]["id"], snapshots=-1)
client.update_quotas(client.tenant_id, snapshots=-1)
quotas = client.show_quotas(client.creds["tenant"]["id"])
quotas = client.show_quotas(client.tenant_id)
self.assertEqual(-1, quotas.get('snapshots'))
@ -296,20 +281,19 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
def test_unlimited_user_quota_for_snapshots(self):
client = self.get_client_with_isolated_creds()
client.update_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"],
client.tenant_id, client.user_id,
snapshots=-1)
quotas = client.show_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"])
quotas = client.show_quotas(client.tenant_id, client.user_id)
self.assertEqual(-1, quotas.get('snapshots'))
@test.attr(type=["gate", "smoke", ])
def test_unlimited_quota_for_gigabytes(self):
client = self.get_client_with_isolated_creds()
client.update_quotas(client.creds["tenant"]["id"], gigabytes=-1)
client.update_quotas(client.tenant_id, gigabytes=-1)
quotas = client.show_quotas(client.creds["tenant"]["id"])
quotas = client.show_quotas(client.tenant_id)
self.assertEqual(-1, quotas.get('gigabytes'))
@ -317,9 +301,9 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
def test_unlimited_quota_for_snapshot_gigabytes(self):
client = self.get_client_with_isolated_creds()
client.update_quotas(
client.creds["tenant"]["id"], snapshot_gigabytes=-1)
client.tenant_id, snapshot_gigabytes=-1)
quotas = client.show_quotas(client.creds["tenant"]["id"])
quotas = client.show_quotas(client.tenant_id)
self.assertEqual(-1, quotas.get('snapshot_gigabytes'))
@ -327,11 +311,10 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
def test_unlimited_user_quota_for_gigabytes(self):
client = self.get_client_with_isolated_creds()
client.update_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"],
client.tenant_id, client.user_id,
gigabytes=-1)
quotas = client.show_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"])
quotas = client.show_quotas(client.tenant_id, client.user_id)
self.assertEqual(-1, quotas.get('gigabytes'))
@ -339,20 +322,19 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
def test_unlimited_user_quota_for_snapshot_gigabytes(self):
client = self.get_client_with_isolated_creds()
client.update_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"],
client.tenant_id, client.user_id,
snapshot_gigabytes=-1)
quotas = client.show_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"])
quotas = client.show_quotas(client.tenant_id, client.user_id)
self.assertEqual(-1, quotas.get('snapshot_gigabytes'))
@test.attr(type=["gate", "smoke", ])
def test_unlimited_quota_for_share_networks(self):
client = self.get_client_with_isolated_creds()
client.update_quotas(client.creds["tenant"]["id"], share_networks=-1)
client.update_quotas(client.tenant_id, share_networks=-1)
quotas = client.show_quotas(client.creds["tenant"]["id"])
quotas = client.show_quotas(client.tenant_id)
self.assertEqual(-1, quotas.get('share_networks'))
@ -360,10 +342,9 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
def test_unlimited_user_quota_for_share_networks(self):
client = self.get_client_with_isolated_creds()
client.update_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"],
client.tenant_id, client.user_id,
share_networks=-1)
quotas = client.show_quotas(
client.creds["tenant"]["id"], client.creds["user"]["id"])
quotas = client.show_quotas(client.tenant_id, client.user_id)
self.assertEqual(-1, quotas.get('share_networks'))

View File

@ -32,13 +32,8 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
def resource_setup(cls):
cls.os = clients.AdminManager()
super(SharesAdminQuotasNegativeTest, cls).resource_setup()
# Get tenant and user
cls.identity_client = cls._get_identity_admin_client()
cls.tenant = cls.identity_client.get_tenant_by_name(
cls.shares_client.auth_params["tenant"])
cls.user = cls.identity_client.get_user_by_username(
cls.tenant["id"], cls.shares_client.auth_params["user"])
cls.user_id = cls.shares_client.user_id
cls.tenant_id = cls.shares_client.tenant_id
@test.attr(type=["gate", "smoke", "negative"])
def test_get_quotas_with_empty_tenant_id(self):
@ -57,7 +52,7 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
self.assertRaises(lib_exc.BadRequest,
client.update_quotas,
client.creds["tenant"]["id"],
client.tenant_id,
shares=-2)
@test.attr(type=["gate", "smoke", "negative"])
@ -66,7 +61,7 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
self.assertRaises(lib_exc.BadRequest,
client.update_quotas,
client.creds["tenant"]["id"],
client.tenant_id,
snapshots=-2)
@test.attr(type=["gate", "smoke", "negative"])
@ -75,7 +70,7 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
self.assertRaises(lib_exc.BadRequest,
client.update_quotas,
client.creds["tenant"]["id"],
client.tenant_id,
gigabytes=-2)
@test.attr(type=["gate", "smoke", "negative"])
@ -84,7 +79,7 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
self.assertRaises(lib_exc.BadRequest,
client.update_quotas,
client.creds["tenant"]["id"],
client.tenant_id,
snapshot_gigabytes=-2)
@test.attr(type=["gate", "smoke", "negative"])
@ -93,7 +88,7 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
self.assertRaises(lib_exc.BadRequest,
client.update_quotas,
client.creds["tenant"]["id"],
client.tenant_id,
share_networks=-2)
@test.attr(type=["gate", "smoke", "negative"])
@ -112,14 +107,14 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
# get current quotas for tenant
tenant_quotas = client.show_quotas(client.creds["tenant"]["id"])
tenant_quotas = client.show_quotas(client.tenant_id)
# try set user quota for shares bigger than tenant quota
bigger_value = int(tenant_quotas["shares"]) + 2
self.assertRaises(lib_exc.BadRequest,
client.update_quotas,
client.creds["tenant"]["id"],
client.creds["user"]["id"],
client.tenant_id,
client.user_id,
shares=bigger_value)
@test.attr(type=["gate", "smoke", "negative"])
@ -127,14 +122,14 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
# get current quotas for tenant
tenant_quotas = client.show_quotas(client.creds["tenant"]["id"])
tenant_quotas = client.show_quotas(client.tenant_id)
# try set user quota for snapshots bigger than tenant quota
bigger_value = int(tenant_quotas["snapshots"]) + 2
self.assertRaises(lib_exc.BadRequest,
client.update_quotas,
client.creds["tenant"]["id"],
client.creds["user"]["id"],
client.tenant_id,
client.user_id,
snapshots=bigger_value)
@test.attr(type=["gate", "smoke", "negative"])
@ -142,14 +137,14 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
# get current quotas for tenant
tenant_quotas = client.show_quotas(client.creds["tenant"]["id"])
tenant_quotas = client.show_quotas(client.tenant_id)
# try set user quota for gigabytes bigger than tenant quota
bigger_value = int(tenant_quotas["gigabytes"]) + 2
self.assertRaises(lib_exc.BadRequest,
client.update_quotas,
client.creds["tenant"]["id"],
client.creds["user"]["id"],
client.tenant_id,
client.user_id,
gigabytes=bigger_value)
@test.attr(type=["gate", "smoke", "negative"])
@ -157,14 +152,14 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
# get current quotas for tenant
tenant_quotas = client.show_quotas(client.creds["tenant"]["id"])
tenant_quotas = client.show_quotas(client.tenant_id)
# try set user quota for snapshot gigabytes bigger than tenant quota
bigger_value = int(tenant_quotas["snapshot_gigabytes"]) + 2
self.assertRaises(lib_exc.BadRequest,
client.update_quotas,
client.creds["tenant"]["id"],
client.creds["user"]["id"],
client.tenant_id,
client.user_id,
snapshot_gigabytes=bigger_value)
@test.attr(type=["gate", "smoke", "negative"])
@ -172,12 +167,12 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
client = self.get_client_with_isolated_creds()
# get current quotas for tenant
tenant_quotas = client.show_quotas(client.creds["tenant"]["id"])
tenant_quotas = client.show_quotas(client.tenant_id)
# try set user quota for share_networks bigger than tenant quota
bigger_value = int(tenant_quotas["share_networks"]) + 2
self.assertRaises(lib_exc.BadRequest,
client.update_quotas,
client.creds["tenant"]["id"],
client.creds["user"]["id"],
client.tenant_id,
client.user_id,
share_networks=bigger_value)

View File

@ -129,15 +129,6 @@ class BaseSharesTest(test.BaseTestCase):
os = clients.Manager(credentials=creds)
client = os.shares_client
# Get tenant and user
identity_client = cls._get_identity_admin_client()
client.creds = {}
client.creds["tenant"] = identity_client.get_tenant_by_name(
client.auth_params["tenant"])
client.creds["user"] = identity_client.get_user_by_username(
client.creds["tenant"]["id"],
client.auth_params["user"])
# Set place where will be deleted isolated creds
ic_res = {
"method": ic.clear_isolated_creds,
@ -254,10 +245,7 @@ class BaseSharesTest(test.BaseTestCase):
# Create suitable network
if (net_id is None or subnet_id is None):
ic = isolated_creds.IsolatedCreds(name=service_net_name)
identity_client = cls._get_identity_admin_client()
tenant = identity_client.\
get_tenant_by_name(sc.auth_params["tenant"])
net_data = ic._create_network_resources(tenant["id"])
net_data = ic._create_network_resources(sc.tenant_id)
network, subnet, router = net_data
net_id = network["id"]
subnet_id = subnet["id"]

View File

@ -22,17 +22,12 @@ class SharesQuotasTest(base.BaseSharesTest):
@classmethod
def resource_setup(cls):
super(SharesQuotasTest, cls).resource_setup()
# Get tenant and user
cls.identity_client = cls._get_identity_admin_client()
cls.tenant = cls.identity_client.get_tenant_by_name(
cls.shares_client.auth_params["tenant"])
cls.user = cls.identity_client.get_user_by_username(
cls.tenant["id"], cls.shares_client.auth_params["user"])
cls.user_id = cls.shares_client.user_id
cls.tenant_id = cls.shares_client.tenant_id
@test.attr(type=["gate", "smoke", ])
def test_default_quotas(self):
quotas = self.shares_client.default_quotas(self.tenant["id"])
quotas = self.shares_client.default_quotas(self.tenant_id)
self.assertGreater(int(quotas["gigabytes"]), -2)
self.assertGreater(int(quotas["snapshot_gigabytes"]), -2)
self.assertGreater(int(quotas["shares"]), -2)
@ -41,7 +36,7 @@ class SharesQuotasTest(base.BaseSharesTest):
@test.attr(type=["gate", "smoke", ])
def test_show_quotas(self):
quotas = self.shares_client.show_quotas(self.tenant["id"])
quotas = self.shares_client.show_quotas(self.tenant_id)
self.assertGreater(int(quotas["gigabytes"]), -2)
self.assertGreater(int(quotas["snapshot_gigabytes"]), -2)
self.assertGreater(int(quotas["shares"]), -2)
@ -51,7 +46,7 @@ class SharesQuotasTest(base.BaseSharesTest):
@test.attr(type=["gate", "smoke", ])
def test_show_quotas_for_user(self):
quotas = self.shares_client.show_quotas(
self.tenant["id"], self.user["id"])
self.tenant_id, self.user_id)
self.assertGreater(int(quotas["gigabytes"]), -2)
self.assertGreater(int(quotas["snapshot_gigabytes"]), -2)
self.assertGreater(int(quotas["shares"]), -2)

View File

@ -22,19 +22,6 @@ from tempest import test
class SharesQuotasNegativeTest(base.BaseSharesTest):
force_tenant_isolation = True
@classmethod
def resource_setup(cls):
super(SharesQuotasNegativeTest, cls).resource_setup()
# Get tenant and user
cls.identity_client = cls._get_identity_admin_client()
cls.tenant = cls.identity_client.get_tenant_by_name(
cls.shares_client.auth_params["tenant"])
cls.user = cls.identity_client.get_user_by_username(
cls.tenant["id"], cls.shares_client.auth_params["user"])
@test.attr(type=["gate", "smoke", "negative"])
def test_get_quotas_with_empty_tenant_id(self):
self.assertRaises(lib_exc.NotFound,

View File

@ -36,11 +36,8 @@ class ShareScenarioTest(manager.NetworkScenarioTest):
cls.set_network_resources()
super(ShareScenarioTest, cls).resource_setup()
os = clients_share.Manager(
credentials=cls.credentials()
)
# Manila clients
cls.shares_client = os.shares_client
cls.shares_client = clients_share.Manager().shares_client
cls.shares_admin_client = clients_share.AdminManager().shares_client
def _create_share(self, share_protocol=None, size=1, name=None,

View File

@ -47,7 +47,6 @@ class SharesClient(service_client.ServiceClient):
self.share_network_id = CONF.share.share_network_id
self.build_interval = CONF.share.build_interval
self.build_timeout = CONF.share.build_timeout
self.auth_params = auth_provider._auth_params()
def create_share(self, share_protocol=None, size=1,
name=None, snapshot_id=None, description=None,