Skip to content
Snippets Groups Projects
Commit 02e1292d authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

cfgupgrade: Add option to override config verification


This is needed in a new test script for cfgupgrade where it's better
to only use the minimum parts necessary for testing cfgupgrade.
Including full configuration data to ensure verification doesn't fail
would make maintenance difficult.

Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 30acff6c
No related branches found
No related tags found
No related merge requests found
......@@ -90,6 +90,9 @@ def main():
parser.add_option('--path', help="Convert configuration in this"
" directory instead of '%s'" % constants.DATA_DIR,
default=constants.DATA_DIR, dest="data_dir")
parser.add_option("--no-verify",
help="Do not verify configuration after upgrade",
action="store_true", dest="no_verify", default=False)
(options, args) = parser.parse_args()
# We need to keep filenames locally because they might be renamed between
......@@ -173,7 +176,7 @@ def main():
raise
# test loading the config file
if not options.dry_run:
if not (options.dry_run or options.no_verify):
logging.info("Testing the new config file...")
cfg = config.ConfigWriter(cfg_file=options.CONFIG_DATA_PATH,
offline=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment