qos: Add API test for shared policy

Change-Id: I7332db37933905942080b94451ff2fa6257b742e
This commit is contained in:
Jakub Libosvar 2016-06-07 07:56:13 +00:00
parent d8ae9cf475
commit c3e1d9c895

View File

@ -287,6 +287,16 @@ class QosTestJSON(base.BaseAdminNetworkTest):
with testtools.ExpectedException(exceptions.NotFound):
self.admin_client.show_qos_policy(policy['id'])
@test.idempotent_id('fb384bde-a973-41c3-a542-6f77a092155f')
def test_get_policy_that_is_shared(self):
policy = self.create_qos_policy(
name='test-policy-shared',
description='shared policy',
shared=True,
tenant_id=self.admin_client.tenant_id)
obtained_policy = self.client.show_qos_policy(policy['id'])['policy']
self.assertEqual(obtained_policy, policy)
class QosBandwidthLimitRuleTestJSON(base.BaseAdminNetworkTest):
@classmethod