ivan-zhu | d57f3cf | 2013-11-06 16:59:52 +0800 | [diff] [blame] | 1 | # Copyright 2012 OpenStack Foundation |
| 2 | # All Rights Reserved. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 5 | # not use this file except in compliance with the License. You may obtain |
| 6 | # 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, WITHOUT |
| 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 | # License for the specific language governing permissions and limitations |
| 14 | # under the License. |
| 15 | |
| 16 | from tempest.api.compute import base |
Takeaki Matsumoto | df4ab7c | 2015-08-25 17:49:23 +0900 | [diff] [blame] | 17 | from tempest import config |
Ken'ichi Ohmichi | 6c92edf | 2017-01-27 17:32:10 -0800 | [diff] [blame] | 18 | from tempest.lib import decorators |
ivan-zhu | d57f3cf | 2013-11-06 16:59:52 +0800 | [diff] [blame] | 19 | |
Takeaki Matsumoto | df4ab7c | 2015-08-25 17:49:23 +0900 | [diff] [blame] | 20 | CONF = config.CONF |
| 21 | |
ivan-zhu | d57f3cf | 2013-11-06 16:59:52 +0800 | [diff] [blame] | 22 | |
Ken'ichi Ohmichi | 02a8ccd | 2015-11-05 06:05:29 +0000 | [diff] [blame] | 23 | class CertificatesV2TestJSON(base.BaseV2ComputeTest): |
zhufl | 36ef089 | 2020-08-12 13:47:21 +0800 | [diff] [blame] | 24 | """Test Certificates API""" |
ivan-zhu | d57f3cf | 2013-11-06 16:59:52 +0800 | [diff] [blame] | 25 | |
Takeaki Matsumoto | df4ab7c | 2015-08-25 17:49:23 +0900 | [diff] [blame] | 26 | @classmethod |
| 27 | def skip_checks(cls): |
| 28 | super(CertificatesV2TestJSON, cls).skip_checks() |
| 29 | if not CONF.compute_feature_enabled.nova_cert: |
| 30 | raise cls.skipException("Nova cert is not available") |
| 31 | |
Ken'ichi Ohmichi | 6c92edf | 2017-01-27 17:32:10 -0800 | [diff] [blame] | 32 | @decorators.idempotent_id('c070a441-b08e-447e-a733-905909535b1b') |
Eiichi Aikawa | a30e519 | 2014-03-31 14:58:12 +0900 | [diff] [blame] | 33 | def test_create_root_certificate(self): |
zhufl | 36ef089 | 2020-08-12 13:47:21 +0800 | [diff] [blame] | 34 | """Test creating root certificate""" |
zhufl | 78c9139 | 2017-08-02 13:58:53 +0800 | [diff] [blame] | 35 | self.certificates_client.create_certificate() |
Eiichi Aikawa | a30e519 | 2014-03-31 14:58:12 +0900 | [diff] [blame] | 36 | |
Ken'ichi Ohmichi | 6c92edf | 2017-01-27 17:32:10 -0800 | [diff] [blame] | 37 | @decorators.idempotent_id('3ac273d0-92d2-4632-bdfc-afbc21d4606c') |
Eiichi Aikawa | a30e519 | 2014-03-31 14:58:12 +0900 | [diff] [blame] | 38 | def test_get_root_certificate(self): |
zhufl | 36ef089 | 2020-08-12 13:47:21 +0800 | [diff] [blame] | 39 | """Test getting root certificate details""" |
zhufl | 78c9139 | 2017-08-02 13:58:53 +0800 | [diff] [blame] | 40 | self.certificates_client.show_certificate('root') |