[QoS] Add API test for create port with admin's QoS policy
This patch adds API test which checks if regular user can create port in own network if this network has got QoS policy configured by admin and this QoS policy belongs to admin. Issue with such scenario was reported in related bug. Change-Id: I08f337f3bf786ae66f57d48ec8698845ac568b97 Related-Bug: #1750591 Depends-On: I464888ca3920b42edd6ab638f6a317ee51ef0994
This commit is contained in:
parent
6bd9b11810
commit
508dd2977c
@ -386,6 +386,19 @@ class QosTestJSON(base.BaseAdminNetworkTest):
|
||||
self.assertEqual(
|
||||
policy['id'], retrieved_network['network']['qos_policy_id'])
|
||||
|
||||
@decorators.idempotent_id('06060880-2956-4c16-9a63-f284c3879229')
|
||||
def test_user_create_port_with_admin_qos_policy(self):
|
||||
qos_policy = self.create_qos_policy(
|
||||
name='test-policy',
|
||||
tenant_id=self.admin_client.tenant_id,
|
||||
shared=False)
|
||||
network = self.create_network(
|
||||
'test network', client=self.admin_client,
|
||||
project_id=self.client.tenant_id,
|
||||
qos_policy_id=qos_policy['id'])
|
||||
port = self.create_port(network)
|
||||
self.assertEqual(network['id'], port['network_id'])
|
||||
|
||||
|
||||
class QosBandwidthLimitRuleTestJSON(base.BaseAdminNetworkTest):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user