Unit tests fails with oslo.config 7.0

Glance unit tests fails using oslo.config 7.0 while parsing
command line options. In oslo.config 7.0 default value of for
'required' option is changed to None from False. This 'required'
option is used to specify whether positional arguments are
required or not. As glance replicator command line tool is using
some positional arguments which are not always required causing
problems for running unit tests.

Added required=False to these positional arguments to fix this
issue.

Co-authored-by: Stephen Finucane <sfinucan@redhat.com>
Co-authored-by: Abhishek Kekane <akekane@redhat.com>

Change-Id: I3d048010c5c3a62adba0315d3d6c9bb3c051a8e2
This commit is contained in:
Abhishek Kekane 2020-02-12 05:45:13 +00:00
parent 40ee49b217
commit 348bff6c49
1 changed files with 2 additions and 0 deletions

View File

@ -76,9 +76,11 @@ cli_opts = [
"one. This is the token used for the target system.")),
cfg.StrOpt('command',
positional=True,
required=False,
help="Command to be given to replicator"),
cfg.MultiStrOpt('args',
positional=True,
required=False,
help="Arguments for the command"),
]