summaryrefslogtreecommitdiff
path: root/watcher_tempest_plugin/tests/api/admin/test_api_discovery.py
diff options
context:
space:
mode:
Diffstat (limited to 'watcher_tempest_plugin/tests/api/admin/test_api_discovery.py')
-rw-r--r--watcher_tempest_plugin/tests/api/admin/test_api_discovery.py47
1 files changed, 0 insertions, 47 deletions
diff --git a/watcher_tempest_plugin/tests/api/admin/test_api_discovery.py b/watcher_tempest_plugin/tests/api/admin/test_api_discovery.py
deleted file mode 100644
index f30cb4b..0000000
--- a/watcher_tempest_plugin/tests/api/admin/test_api_discovery.py
+++ /dev/null
@@ -1,47 +0,0 @@
1# -*- encoding: utf-8 -*-
2# Copyright (c) 2016 b<>com
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13# implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17from tempest.lib import decorators
18
19from watcher_tempest_plugin.tests.api.admin import base
20
21
22class TestApiDiscovery(base.BaseInfraOptimTest):
23 """Tests for API discovery features."""
24
25 @decorators.attr(type='smoke')
26 def test_api_versions(self):
27 _, descr = self.client.get_api_description()
28 expected_versions = ('v1',)
29 versions = [version['id'] for version in descr['versions']]
30
31 for v in expected_versions:
32 self.assertIn(v, versions)
33
34 @decorators.attr(type='smoke')
35 def test_default_version(self):
36 _, descr = self.client.get_api_description()
37 default_version = descr['default_version']
38 self.assertEqual('v1', default_version['id'])
39
40 @decorators.attr(type='smoke')
41 def test_version_1_resources(self):
42 _, descr = self.client.get_version_description(version='v1')
43 expected_resources = ('audit_templates', 'audits', 'action_plans',
44 'actions', 'links', 'media_types')
45
46 for res in expected_resources:
47 self.assertIn(res, descr)