Use MultiStrOpt instead of ListOpt for args
This allows arguments to be provided space-separated, instead of comma-separated. Closes-Bug: #1598928 Change-Id: I3c60a015a4fe45201ca3272f5d9cc7a9bb1bedd3
This commit is contained in:
parent
5e99a99c6a
commit
aff592de1a
|
@ -73,7 +73,7 @@ cli_opts = [
|
||||||
cfg.StrOpt('command',
|
cfg.StrOpt('command',
|
||||||
positional=True,
|
positional=True,
|
||||||
help="Command to be given to replicator"),
|
help="Command to be given to replicator"),
|
||||||
cfg.ListOpt('args',
|
cfg.MultiStrOpt('args',
|
||||||
positional=True,
|
positional=True,
|
||||||
help="Arguments for the command"),
|
help="Arguments for the command"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
"""Functional test cases for glance-replicator"""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from glance.tests import functional
|
||||||
|
from glance.tests.utils import execute
|
||||||
|
|
||||||
|
|
||||||
|
class TestGlanceReplicator(functional.FunctionalTest):
|
||||||
|
"""Functional tests for glance-replicator"""
|
||||||
|
|
||||||
|
def test_compare(self):
|
||||||
|
# Test for issue: https://bugs.launchpad.net/glance/+bug/1598928
|
||||||
|
cmd = ('%s -m glance.cmd.replicator '
|
||||||
|
'compare az1:9292 az2:9292 --debug' %
|
||||||
|
(sys.executable,))
|
||||||
|
exitcode, out, err = execute(cmd, raise_error=False)
|
||||||
|
self.assertIn(
|
||||||
|
'Request: GET http://az1:9292/v1/images/detail?is_public=None',
|
||||||
|
err
|
||||||
|
)
|
Loading…
Reference in New Issue