Add sorting and pagination tests for trunk resources
As per Ihar's request.
Partially-implements: blueprint vlan-aware-vms
Change-Id: Ib7c28605b317ccb1fbf04bbdb641ec8a0d2e5004
diff --git a/neutron/tests/tempest/api/test_trunk.py b/neutron/tests/tempest/api/test_trunk.py
index 589acf9..640584a 100644
--- a/neutron/tests/tempest/api/test_trunk.py
+++ b/neutron/tests/tempest/api/test_trunk.py
@@ -131,3 +131,53 @@
trunk = self.client.get_subports(trunk['trunk']['id'])
observed_subports = trunk['sub_ports']
self.assertEqual(1, len(observed_subports))
+
+
+class TrunksSearchCriteriaTest(base.BaseSearchCriteriaTest):
+
+ resource = 'trunk'
+ field = 'id'
+
+ @classmethod
+ def resource_setup(cls):
+ super(TrunksSearchCriteriaTest, cls).resource_setup()
+ net = cls.create_network(network_name='trunk-search-test-net')
+ for name in cls.resource_names:
+ parent_port = cls.create_port(net)
+ cls.client.create_trunk(parent_port['id'], [])
+
+ @test.idempotent_id('fab73df4-960a-4ae3-87d3-60992b8d3e2d')
+ def test_list_sorts_asc(self):
+ self._test_list_sorts_asc()
+
+ @test.idempotent_id('a426671d-7270-430f-82ff-8f33eec93010')
+ def test_list_sorts_desc(self):
+ self._test_list_sorts_desc()
+
+ @test.idempotent_id('b202fdc8-6616-45df-b6a0-463932de6f94')
+ def test_list_pagination(self):
+ self._test_list_pagination()
+
+ @test.idempotent_id('c4723b8e-8186-4b9a-bf9e-57519967e048')
+ def test_list_pagination_with_marker(self):
+ self._test_list_pagination_with_marker()
+
+ @test.idempotent_id('dcd02a7a-f07e-4d5e-b0ca-b58e48927a9b')
+ def test_list_pagination_with_href_links(self):
+ self._test_list_pagination_with_href_links()
+
+ @test.idempotent_id('eafe7024-77ab-4cfe-824b-0b2bf4217727')
+ def test_list_no_pagination_limit_0(self):
+ self._test_list_no_pagination_limit_0()
+
+ @test.idempotent_id('f8857391-dc44-40cc-89b7-2800402e03ce')
+ def test_list_pagination_page_reverse_asc(self):
+ self._test_list_pagination_page_reverse_asc()
+
+ @test.idempotent_id('ae51e9c9-ceae-4ec0-afd4-147569247699')
+ def test_list_pagination_page_reverse_desc(self):
+ self._test_list_pagination_page_reverse_desc()
+
+ @test.idempotent_id('b4293e59-d794-4a93-be09-38667199ef68')
+ def test_list_pagination_page_reverse_with_href_links(self):
+ self._test_list_pagination_page_reverse_with_href_links()