mirror of
https://opendev.org/openstack/python-openstackclient.git
synced 2026-01-17 07:20:45 +00:00
Merge "image cache clear: fix value of default target"
This commit is contained in:
commit
c13977fd68
2 changed files with 4 additions and 2 deletions
|
|
@ -194,6 +194,7 @@ class ClearCachedImage(command.Command):
|
|||
"--cache",
|
||||
action="store_const",
|
||||
const="cache",
|
||||
default="both",
|
||||
dest="target",
|
||||
help=_("Clears all the cached images"),
|
||||
)
|
||||
|
|
@ -201,6 +202,7 @@ class ClearCachedImage(command.Command):
|
|||
"--queue",
|
||||
action="store_const",
|
||||
const="queue",
|
||||
default="both",
|
||||
dest="target",
|
||||
help=_("Clears all the queued images"),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -184,13 +184,13 @@ class TestCacheClear(fakes.TestImagev2):
|
|||
def test_cache_clear_no_option(self):
|
||||
arglist = []
|
||||
|
||||
verifylist = [('target', None)]
|
||||
verifylist = [('target', 'both')]
|
||||
|
||||
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
||||
self.cmd.take_action(parsed_args)
|
||||
|
||||
self.assertIsNone(
|
||||
self.image_client.clear_cache.assert_called_with(None)
|
||||
self.image_client.clear_cache.assert_called_with('both')
|
||||
)
|
||||
|
||||
def test_cache_clear_queue_option(self):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue