diff --git a/heatclient/tests/functional/base.py b/heatclient/tests/functional/base.py index 44718cad..b0d8a8ed 100644 --- a/heatclient/tests/functional/base.py +++ b/heatclient/tests/functional/base.py @@ -40,3 +40,6 @@ class ClientTestBase(base.ClientTestBase): def heat(self, *args, **kwargs): return self.clients.heat(*args, **kwargs) + + def openstack(self, *args, **kwargs): + return self.clients.openstack(*args, **kwargs) diff --git a/heatclient/tests/functional/osc/__init__.py b/heatclient/tests/functional/osc/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/heatclient/tests/functional/osc/v1/__init__.py b/heatclient/tests/functional/osc/v1/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/heatclient/tests/functional/osc/v1/test_readonly.py b/heatclient/tests/functional/osc/v1/test_readonly.py new file mode 100644 index 00000000..3c70a47d --- /dev/null +++ b/heatclient/tests/functional/osc/v1/test_readonly.py @@ -0,0 +1,40 @@ +# 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_lib import exceptions + +from heatclient.tests.functional import base + + +class SimpleReadOnlyOpenStackClientTest(base.ClientTestBase): + """Basic, read-only tests for Openstack CLI client heat plugin. + + Basic smoke test for the openstack CLI commands which do not require + creating or modifying stacks. + """ + + def test_openstack_fake_action(self): + self.assertRaises(exceptions.CommandFailed, + self.openstack, + 'this-does-not-exist') + + def test_openstack_stack_list(self): + self.openstack('stack list') + + def test_openstack_stack_list_debug(self): + self.openstack('stack list', flags='--debug') + + def test_openstack_help_cmd(self): + self.openstack('help stack') + + def test_openstack_version(self): + self.openstack('', flags='--version')