Browse Source

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
tags/20.0.0.0b2
Abhishek Kekane 1 week ago
parent
commit
348bff6c49
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      glance/cmd/replicator.py

+ 2
- 0
glance/cmd/replicator.py 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"),
]


Loading…
Cancel
Save