From 4d9da2c40ae02086258cfde852b297754d8085fa Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Tue, 10 Jan 2017 15:13:47 +0800 Subject: Fix OSC networking commands help errors OSC networking commands need to authenticate to get service catalog, then decide to show nova-network or neutron command help message. Fake token and fake auth_type in prepare_to_run_command() casue os-cloud-config use AdminToken auth plugin, but pass all the auth information (include: username, password and so on) to it, that casue the class initialization error. Pop the fake token and url, then try to load auth plugin again to fix the issue. Change-Id: I8b140f0b0a60681fc2a35a013bb0c84ff8cb9589 Closes-Bug: #1650026 --- openstackclient/tests/functional/common/test_help.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'openstackclient/tests/functional/common') diff --git a/openstackclient/tests/functional/common/test_help.py b/openstackclient/tests/functional/common/test_help.py index bbc52197..211c52b1 100644 --- a/openstackclient/tests/functional/common/test_help.py +++ b/openstackclient/tests/functional/common/test_help.py @@ -64,3 +64,10 @@ class HelpTests(base.TestCase): raw_output = self.openstack('help server') for command in [row[0] for row in self.SERVER_COMMANDS]: self.assertIn(command, raw_output) + + def test_networking_commands_help(self): + """Check networking related commands in help message.""" + raw_output = self.openstack('help network list') + self.assertIn('List networks', raw_output) + raw_output = self.openstack('network create --help') + self.assertIn('Create new network', raw_output) -- cgit v1.2.1