Merge "Use MultiStrOpt instead of ListOpt for args"

This commit is contained in:
Jenkins 2016-07-06 19:35:18 +00:00 committed by Gerrit Code Review
commit ddff5978dc
2 changed files with 36 additions and 3 deletions

View File

@ -73,9 +73,9 @@ cli_opts = [
cfg.StrOpt('command',
positional=True,
help="Command to be given to replicator"),
cfg.ListOpt('args',
positional=True,
help="Arguments for the command"),
cfg.MultiStrOpt('args',
positional=True,
help="Arguments for the command"),
]
CONF = cfg.CONF

View File

@ -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
)