Ihar Hrachyshka | 3cf4e7f | 2016-06-14 11:40:19 +0200 | [diff] [blame^] | 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 2 | # not use this file except in compliance with the License. You may obtain |
| 3 | # a copy of the License at |
| 4 | # |
| 5 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | # |
| 7 | # Unless required by applicable law or agreed to in writing, software |
| 8 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 9 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 10 | # License for the specific language governing permissions and limitations |
| 11 | # under the License. |
| 12 | |
| 13 | from tempest import test |
| 14 | |
| 15 | from neutron.tests.tempest.api import base |
| 16 | |
| 17 | |
| 18 | class SubnetsSearchCriteriaTest(base.BaseSearchCriteriaTest): |
| 19 | |
| 20 | resource = 'subnet' |
| 21 | |
| 22 | list_kwargs = {'shared': False} |
| 23 | |
| 24 | @classmethod |
| 25 | def resource_setup(cls): |
| 26 | super(SubnetsSearchCriteriaTest, cls).resource_setup() |
| 27 | net = cls.create_network(network_name='subnet-search-test-net') |
| 28 | for name in cls.resource_names: |
| 29 | cls.create_subnet(net, name=name) |
| 30 | |
| 31 | @test.attr(type='smoke') |
| 32 | @test.idempotent_id('d2d61995-5dd5-4b93-bce7-3edefdb79563') |
| 33 | def test_list_sorts_asc(self): |
| 34 | self._test_list_sorts_asc() |
| 35 | |
| 36 | @test.attr(type='smoke') |
| 37 | @test.idempotent_id('c3c6b0af-c4ac-4da0-b568-8d08ae550604') |
| 38 | def test_list_sorts_desc(self): |
| 39 | self._test_list_sorts_desc() |
| 40 | |
| 41 | @test.attr(type='smoke') |
| 42 | @test.idempotent_id('b93063b3-f713-406e-bf93-e5738e09153c') |
| 43 | def test_list_pagination(self): |
| 44 | self._test_list_pagination() |
| 45 | |
| 46 | @test.attr(type='smoke') |
| 47 | @test.idempotent_id('2ddd9aa6-de28-410f-9cbc-ce752893c407') |
| 48 | def test_list_pagination_with_marker(self): |
| 49 | self._test_list_pagination_with_marker() |
| 50 | |
| 51 | @test.attr(type='smoke') |
| 52 | @test.idempotent_id('351183ef-6ed9-4d71-a9f2-a5ac049bd7ea') |
| 53 | def test_list_pagination_with_href_links(self): |
| 54 | self._test_list_pagination_with_href_links() |
| 55 | |
| 56 | @test.attr(type='smoke') |
| 57 | @test.idempotent_id('dfaa20ca-6d84-4f26-962f-2fee4d247cd9') |
| 58 | def test_list_pagination_page_reverse_asc(self): |
| 59 | self._test_list_pagination_page_reverse_asc() |
| 60 | |
| 61 | @test.attr(type='smoke') |
| 62 | @test.idempotent_id('40552213-3e12-4d6a-86f3-dda92f3de88c') |
| 63 | def test_list_pagination_page_reverse_desc(self): |
| 64 | self._test_list_pagination_page_reverse_desc() |
| 65 | |
| 66 | @test.attr(type='smoke') |
| 67 | @test.idempotent_id('3cea9053-a731-4480-93ee-19b2c28a9ce4') |
| 68 | def test_list_pagination_page_reverse_with_href_links(self): |
| 69 | self._test_list_pagination_page_reverse_with_href_links() |
| 70 | |
| 71 | @test.attr(type='smoke') |
| 72 | @test.idempotent_id('d851937c-9821-4b46-9d18-43e9077ecac0') |
| 73 | def test_list_no_pagination_limit_0(self): |
| 74 | self._test_list_no_pagination_limit_0() |