Multiple API version support
* Use multiple entry point groups to represent each API+version combination supported * Add some tests Try it out: * Right now only '* user' commands have multiple overlapping versions; you can see the selection between v2.0 and v3 by looking at the command help output for 'tenant' vs 'project': os --os-identity-api-version=2.0 help set user os --os-identity-api-version=3 help set user Change-Id: I7114fd246843df0243d354a7cce697810bb7de62
This commit is contained in:
@ -108,6 +108,30 @@ class TestShell(utils.TestCase):
|
||||
default_args["image_api_version"])
|
||||
|
||||
|
||||
class TestShellHelp(TestShell):
|
||||
"""Test the deferred help flag"""
|
||||
def setUp(self):
|
||||
super(TestShellHelp, self).setUp()
|
||||
self.orig_env, os.environ = os.environ, {}
|
||||
|
||||
def tearDown(self):
|
||||
super(TestShellHelp, self).tearDown()
|
||||
os.environ = self.orig_env
|
||||
|
||||
def test_help_options(self):
|
||||
flag = "-h list server"
|
||||
kwargs = {
|
||||
"deferred_help": True,
|
||||
}
|
||||
with mock.patch("openstackclient.shell.OpenStackShell.initialize_app",
|
||||
self.app):
|
||||
_shell, _cmd = make_shell(), flag
|
||||
fake_execute(_shell, _cmd)
|
||||
|
||||
self.assertEqual(_shell.options.deferred_help,
|
||||
kwargs["deferred_help"])
|
||||
|
||||
|
||||
class TestShellPasswordAuth(TestShell):
|
||||
def setUp(self):
|
||||
super(TestShellPasswordAuth, self).setUp()
|
||||
|
Reference in New Issue
Block a user