Add simple smoke tests for Murano CLI client
Add the following tests: - Check environment list - Check package list - Check category list Change-Id: Ib29f3e555ed79c5c7350cac0333e0473e91ab389 Implements: blueprint cli-simple-read-only-tests
This commit is contained in:
parent
d794d08302
commit
efd90a7036
@ -28,4 +28,5 @@ TEMPEST_DIR=${TEMPEST_DIR:-/opt/stack/new/tempest}
|
||||
# Add tempest source tree to PYTHONPATH
|
||||
export PYTHONPATH=$PYTHONPATH:$TEMPEST_DIR
|
||||
|
||||
nosetests -sv ../murano/tests/functional/api/v1
|
||||
nosetests -sv ../murano/tests/functional/api/v1 ../murano/tests/functional/cli/simple_read_only
|
||||
|
||||
|
0
murano/tests/functional/cli/__init__.py
Normal file
0
murano/tests/functional/cli/__init__.py
Normal file
23
murano/tests/functional/cli/muranoclient.py
Normal file
23
murano/tests/functional/cli/muranoclient.py
Normal file
@ -0,0 +1,23 @@
|
||||
# Copyright (c) 2014 Mirantis, Inc.
|
||||
#
|
||||
# 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.
|
||||
|
||||
from tempest import cli
|
||||
|
||||
|
||||
class ClientTestBase(cli.ClientTestBase):
|
||||
|
||||
def murano(self, action, flags='', params='', admin=True, fail_ok=False):
|
||||
"""Executes murano command for the given action."""
|
||||
return self.cmd_with_auth(
|
||||
'murano', action, flags, params, admin, fail_ok)
|
42
murano/tests/functional/cli/simple_read_only/test_murano.py
Normal file
42
murano/tests/functional/cli/simple_read_only/test_murano.py
Normal file
@ -0,0 +1,42 @@
|
||||
# Copyright (c) 2014 Mirantis, Inc.
|
||||
#
|
||||
# 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.
|
||||
|
||||
from murano.tests.functional.cli import muranoclient
|
||||
|
||||
|
||||
class SimpleReadOnlyMuranoClientTest(muranoclient.ClientTestBase):
|
||||
"""Basic, read-only tests for Murano CLI client.
|
||||
|
||||
Basic smoke test for the Murano CLI commands which do not require
|
||||
creating or modifying murano objects.
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(SimpleReadOnlyMuranoClientTest, cls).setUpClass()
|
||||
|
||||
def test_environment_list(self):
|
||||
environments = self.parser.listing(self.murano('environment-list'))
|
||||
|
||||
self.assertTableStruct(environments,
|
||||
['ID', 'Name', 'Created', 'Updated'])
|
||||
|
||||
def test_package_list(self):
|
||||
packages = self.parser.listing(self.murano('package-list'))
|
||||
|
||||
self.assertTableStruct(packages,
|
||||
['ID', 'Name', 'FQN', 'Author', 'Is Public'])
|
||||
|
||||
def test_category_list(self):
|
||||
self.murano('category-list')
|
Loading…
Reference in New Issue
Block a user