Improve storage upgrade error and remove useless command arguments
This simple MR aims to:
- improve the error that could be triggered when running the
storage upgradecommand on a directory that is not containing the network inferred by the node (see #4892 (closed)) - introduce a new
resolve_data_dir_and_config_fileto factorize some code - remove the
Shared_args.Term.argsfrom various command to avoid allowing ignored arguments -- only the necessary ones are activated.
Manually testing the MR
Try various usages of --config-file and --data-dir while running a command.
Unfortunately, there is no easy way to add a Tezt test as the configuration file do not handle data_dir for good reasons. Maybe we want to change that?
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Victor Allombert