summaryrefslogtreecommitdiff
path: root/glanceclient/tests
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-05-05 16:00:57 +0000
committerGerrit Code Review <review@openstack.org>2022-05-05 16:00:57 +0000
commit68d18dc2f2f228ff57a9b58083cb264bf6b29224 (patch)
tree5634913634f87611903b33158abc5bc8bb4bbbe6 /glanceclient/tests
parentcf7504e79564e85d4d4a1b51510e48e8d4a85e1c (diff)
parent91ae9347dbc125a19fedd107df5cc013e018e7e1 (diff)
downloadpython-glanceclient-68d18dc2f2f228ff57a9b58083cb264bf6b29224.tar.gz
Merge "glance help <subcommand>: Clearly specify which options are mandatory"
Diffstat (limited to 'glanceclient/tests')
-rw-r--r--glanceclient/tests/unit/test_shell.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/glanceclient/tests/unit/test_shell.py b/glanceclient/tests/unit/test_shell.py
index 129b127..6b9472e 100644
--- a/glanceclient/tests/unit/test_shell.py
+++ b/glanceclient/tests/unit/test_shell.py
@@ -600,6 +600,17 @@ class ShellTest(testutils.TestCase):
self.assertEqual(glance_logger.getEffectiveLevel(), logging.DEBUG)
conf.assert_called_with(level=logging.DEBUG)
+ def test_subcommand_help(self):
+ # Ensure that main works with sub command help
+ stdout, stderr = self.shell('help stores-delete')
+
+ expected = 'usage: glance stores-delete --store <STORE_ID> ' \
+ '<IMAGE_ID>\n\nDelete image from specific store.' \
+ '\n\nPositional arguments:\n <IMAGE_ID> ' \
+ 'ID of image to update.\n\nRequired arguments:\n ' \
+ '--store <STORE_ID> Store to delete image from.\n'
+ self.assertEqual(expected, stdout)
+
class ShellTestWithKeystoneV3Auth(ShellTest):
# auth environment to use