Skip to content

Commit

Permalink
428 check tests for kms (#429)
Browse files Browse the repository at this point in the history
428 check tests for kms

Closes #428

Reviewed-by: Anton Sidelnikov
  • Loading branch information
RusselSand authored Apr 30, 2024
1 parent e50a947 commit fa7c74b
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
1 change: 1 addition & 0 deletions .stestr.blacklist.functional
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ otcextensions.tests.functional.sdk.sfsturbo*
otcextensions.tests.functional.osclient.vpc.v1.test_peering*
otcextensions.tests.functional.sdk.waf.v1.test_domain*
otcextensions.tests.functional.sdk.tms*
otcextensions.tests.functional.osclient.kms*
8 changes: 7 additions & 1 deletion otcextensions/sdk/kms/v1/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ class Key(_base.Resource):
error_msg = resource.Body('error_msg')

def fetch(self, session, requires_id=None,
base_path=None, error_message=None):
base_path=None, error_message=None,
skip_cache=False,
*,
resource_response_key=None,
microversion=None,
**params,
):
if not self.allow_fetch:
raise exceptions.MethodNotSupported(self, "fetch")
url = self.get_path
Expand Down
Empty file.
27 changes: 27 additions & 0 deletions otcextensions/tests/functional/osclient/kms/v1/test_cmk.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import json

from openstackclient.tests.functional import base


class TestCmk(base.TestCase):
"""Functional tests for KMS CMK. """

def test_cmk_list(self):
json_output = json.loads(self.openstack(
'kms cmk list -f json',
cloud='functest_cloud')
)
self.assertGreater(len(json_output), 0)
name = json_output[0]['key_alias']
self.openstack(f'kms cmk show {name}', cloud='terraform')

0 comments on commit fa7c74b

Please sign in to comment.